Distribute a number across cells

Sandeep Warrier

Well-known Member
Joined
Oct 31, 2008
Messages
2,679
Hi Everyone,

Wish you all a happy new year.

I'm looking for a formula solution for this question. Below is some sample data.

If Type = Flat, Value is distributed evenly across months, starting from Report Month to End Date. --> Done
If Type = Bell, distribution of Value follows a Bell Curve.
If Type = Early Peak, distribution starts from a lower value, goes high and then starts getting low again.
If Type = Late Peak, this is the opposite of Early Peak.
If Type = Front Loaded, distribution starts at a high and then reduces.
If Type = Back Loaded, this is the opposite of Front Loaded.
Excel Workbook
ABCDEFGHIJKLMNOPQRSTUVWXY
1Report Month15-Dec-14
2Start Date15-Nov-14
3End Date15-Mar-15
4
5
6TypeValueNov-14Dec-14Jan-15Feb-15Mar-15Apr-15May-15Jun-15
7Flat50012.512.512.512.5000
8Bell50010151510000
9Early Peak5001020155000
10Late Peak5005152010000
11Front Loaded5002015105000
12Back Loaded5005101520000
Sheet1
Excel 2010
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi, just curious, how do you distribute the values?
For instance for Bell, here the distribution is 20%, 30%, 30% 20%.
What would it be for the period 15-Dec-14 to 15-Feb-14:
30%, 40%, 30%?
25%, 50%, 25%?
Thanks...
 
Upvote 0
Hi,

The distribution % in the sample was just a guess. The actual distribution % does not matter as long as it follows the curve. I didn't go the way of pre-setting the distribution % because the month diff can go up to 24-36 months.

I did end up with a way to do this. I'm interested in seeing if anyone can optimize this further.
Excel Workbook
ABCDEFGHIJKLMNOPQR
1Report Month15-Dec-14
2Start Date15-Nov-14
3End Date15-Mar-15
4
5
6TypeValueNov-14Dec-14Jan-15Feb-15Mar-15
7ForecastPlannedActualForecastPlannedActualForecastPlannedActualForecastPlannedActualForecastPlannedActual
8Flat10025252525
9Bell10019.09830130.90169930.90169919.098301
10Early Peak10026.66666753.33333313.3333336.6666667
11Late Peak1006.666666713.33333353.33333326.666667
12Front Loaded10040302010
13Back Loaded10010203040
My Formula
Excel 2010
Cell Formulas
RangeFormula
D8=IF(ISNUMBER(D$6)*(DATE(YEAR($B$1),MONTH($B$1),1)<=D$6),IF($B8="flat",IFERROR(INDEX((ROW($A$1:INDEX($A:$A,Mcount))^0)*($C8/Mcount),ColNum),0),IF($B8="Bell",IFERROR(INDEX((SIN(RADIANS((ROW($A$1:INDEX($A:$A,Mcount))*(180/(Mcount+1))))) /SUMPRODUCT(SIN(RADIANS((ROW($A$1:INDEX($A:$A,Mcount)))*(180/(Mcount+1)))))) * $C8,ColNum),0),IF($B8="Early Peak",IFERROR(INDEX((2^LARGE(ROW($A$1:INDEX($A:$A,Mcount)),ROW($A$1:INDEX($A:$A,Mcount)))/(-2*(1-2^Mcount)))*$C8,IF(ColNum=2,1,IF(ColNum=1,2,ColNum))),0),IF($B8="Late Peak",IFERROR(INDEX((2^ROW($A$1:INDEX($A:$A,Mcount))/(-2*(1-2^Mcount)))*$C8,IF(ColNum=Mcount-1,Mcount,IF(ColNum=Mcount,Mcount-1,ColNum))),0),IF($B8="Front Loaded",IFERROR(INDEX(LARGE(ROW($A$1:INDEX($A:$A,Mcount)),ROW($A$1:INDEX($A:$A,Mcount)))*($C8/(Mcount*(Mcount+1)/2)),ColNum),0),IF($B8="Back Loaded",IFERROR(INDEX(ROW($A$1:INDEX($A:$A,Mcount))*($C8/(Mcount*(Mcount+1)/2)),ColNum),0),0)))))),"")
Excel Workbook
NameRefers To
ColNum=COUNTIFS('My Formula'!$D$7:A$7,"Forecast",'My Formula'!$D$6:A$6,">="&DATE(YEAR('My Formula'!$B$1),MONTH('My Formula'!$B$1),1))
Mcount=ROUND(('My Formula'!$B$3-'My Formula'!$B$1)/30,)+1
Workbook Defined Names
 
Upvote 0
You're welcome, glad it works for you.
 
Upvote 0
shg

Thanks for posting this.

I haven't seen NASA's beta curve before, and your workbook demonstrates it nicely.
 
Upvote 0

Forum statistics

Threads
1,216,765
Messages
6,132,593
Members
449,737
Latest member
naes

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