Distribution Value with Constraint

mrizkiii28

New Member
Joined
Jan 20, 2025
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi Masters,

I want to distribute values from cells S4:S11 to C4:P11. Here are the constraints:
- The sum of C4:P11 must match S4:S11 (Each row) and C14:P14 (Each column)
- The value must be an integer (no decimal and negative values)
- if the value in cell V4 is 1, that means when distributing the values in that row must be a multiple of 6. (applies to V5 until V11)
- The result of distribution as flat as possible

Here is a template for illustration
1737531918766.png


and here is a display formula.
1737531963955.png


Please help to solve that problem.

Thank you in advance for your help.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,226,079
Messages
6,188,771
Members
453,499
Latest member
samdan87153

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top