How to distribute a set number proportionally across cells and still keeping the total at set number

Delta21

New Member
Joined
Sep 13, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi Friends,

Wonder if anyone could help with this proportional distribution function.

A - is a set number in a cell, 55 in this case.
B - I have 19 (1 to 19) workdays in a row
C - I have % distribution ratio of each of the workdays which totals to 100%
D - Using straightforward formula of multiplying distribution ratio to a set number (C x A$) I could get proportional distribution but it is decimals, however I need rounded distribution.
E - Using =ROUND(C x A$),0) give me rounded numbers for each workday, however the total of 19 workdays go to 59, which is understandable because the formula rounded the numbers.

However, what I would like to achieve is have rounded numbers in E but somehow cap the sum of all workdays to A (55), is this possible at all?

I know a way where I can separate the trunc and integers and then apply ranking etc, but that won't work in my scenario as number of rows I will be working with will be in thousands. So any help in achieving this with a magic excel formula would be highly appreciated! :)

Attached is the mini excel spreadsheet with the above illustration and also attaching a screenshot below.

Proportional Distribution Rounding.xlsx
ABCDEFGHIJKLMNOPQRSTUV
2ATotal volume55
3
4BWorkday12345678910111213141516171819
5CDistribution Ratio5.00%3.33%6.67%3.33%1.67%5.00%8.33%5.00%6.67%6.67%3.33%1.67%5.00%3.33%5.00%3.33%6.67%8.33%11.67%100.00%
6DDistribution (Raw)2.750001.833333.666671.833330.916672.750004.583332.750003.666673.666671.833330.916672.750001.833332.750001.833333.666674.583336.4166755.00000
7EDistribution (Rounded)3.000002.000004.000002.000001.000003.000005.000003.000004.000004.000002.000001.000003.000002.000003.000002.000004.000005.000006.0000059.00000
Sheet1
Cell Formulas
RangeFormula
C6:U6C6=C5*$C$2
V6:V7V6=SUM(C6:U6)
C7:U7C7=ROUND(C5*$C$2,0)


1631574340182.png
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
ColorRedNonMatch.xlsm
ABCDEFGHIJKLMNOPQRSTUV
1
2ATotal volume55
3
4BWorkday12345678910111213141516171819
5CDistribution Ratio0.050.0333330.0666670.0333330.0166670.050.0833330.050.0666670.0666670.0333330.0166670.050.0333330.050.0333330.0666670.0833330.1166671
6DDistribution (Raw)2.751.8333333.6666671.8333330.9166672.754.5833332.753.6666673.6666671.8333330.9166672.751.8333332.751.8333333.6666674.5833336.41666755
7EDistribution (Rounded)324213534421323245659
8Adj Diff0.250030.1667070.3333830.1667270.0834030.250080.4167570.25010.3334430.3334530.1667970.0834730.250150.1668270.250170.1668470.3335230.416867-0.416464
9Adj Round324213434321323234655
10
Sheet3
Cell Formulas
RangeFormula
C6:U6C6=C5*$C$2
C7:T7C7=ROUND(C5*$C$2,0)
V6:V7,V9V6=SUM(C6:U6)
C8:U8C8=C7-C6 +COLUMN()/99999.99
V8V8=V7-V6
C9:U9C9=IFERROR(IF($V$8>0,IF(C8>=LARGE($C$8:$U$8,$V$8),C7-1,C7),IF(C8<=SMALL($C$8:$U$8,-$V$8),C7+1,C7)),C7)
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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