Update Equally Distributed Formula

Pestomania

Active Member
Joined
May 30, 2018
Messages
295
Office Version
  1. 365
Platform
  1. Windows
Cell V2 has a formula that does an equal distribution but I would like to make it to where I do not have to add it to every January month field.

As you can see in V3, AH3, and so on, I have to paste the distribution formula into the field. I'd like the formula to auto-fill the table based on the value found in the A1:G26 table.


Book4
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARAS
1Program'23'24'25'26'27'28Batch SizeJan '23Feb '23Mar '23Apr '23May '23Jun '23Jul '23Aug '23Sep '23Oct '23Nov '23Dec '23Jan '24Feb '24Mar '24Apr '24May '24Jun '24Jul '24Aug '24Sep '24Oct '24Nov '24Dec '24
2Program 1805252608832Program 14Program 1488488488488488488488488
3Program 21620201325Program 21Program 2112112112112122122122122
4Program 3289238374391204272Program 317Program 3171734173417173417341734171717171734171717171734
5Program 4162218144244Program 42Program 4022022022022022222222222
6Program 512550109012515Program 55Program 5101010101010101010101015055555055555
7Program 610510515165360240Program 615Program 601501501515015015150150150151501501515
8Program 72504060160120180Program 710Program 72020202020202020202020300010001000100010
Sheet1
Cell Formulas
RangeFormula
U2:U26U2=UNIQUE(A2:A26)
V1:CO1V1=TEXT(DATE("20"&RIGHT(B1,2),SEQUENCE(,12*COUNTIF(A1:G1,"<>'")-12),1),"mmm 'yy")
V2:CO2V2=INDEX(LET(z,SUMPRODUCT(($A$2:$A$26=$U2)*($B$1:$G$1=RIGHT(V$1,3))*$B$2:$G$26)/VLOOKUP($U2,$N$2:$O$26,2,FALSE),b,SEQUENCE(1,12*COUNTIF($A$1:$G$1,"<>'")-12),c,z/12*b,d,INT(z/12)*SEQUENCE(1,12*COUNTIF($A$1:$G$1,"<>'")-12,1,0),e,MOD(c,1),f,IF(INDEX(e,b)<INDEX(e,b-1),d+1,d),f)*VLOOKUP($U2,$N$2:$O$26,2,FALSE),MOD(SEQUENCE(1,12*COUNTIF($A$1:$G$1,"<>'")-12,0),12)+1)
V3:AS8V3=INDEX(LET(z,SUMPRODUCT(($A$2:$A$26=$U3)*($B$1:$G$1=RIGHT(V$1,3))*$B$2:$G$26)/VLOOKUP($U3,$N$2:$O$26,2,FALSE),b,SEQUENCE(1,12),c,z/12*b,d,INT(z/12)*SEQUENCE(1,12,1,0),e,MOD(c,1),f,IF(INDEX(e,b)<INDEX(e,b-1),d+1,d),f)*VLOOKUP($U3,$N$2:$O$26,2,FALSE),MOD(SEQUENCE(1,12,0),12)+1)
Dynamic array formulas.
 
Where do you get a spill error?
Can you maybe upload the file without your data or with random sample data?
Trying to solve it like this is a bit difficult.
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
That works amazing!!

Only question:

Excel Formula:
=CHOOSEROWS(UNIQUE(Dashboard[Program]),ROWS($N$2:$N2))

What is the Rows($N$2:$N2)? Those cells are empty from what I can tell.
 
Upvote 0
The formula
Excel Formula:
=ROWS($N$2:$N2)
gives you a sequence of numbers starting from 1 and incrementing as you drag down:

Prestons Playground for Modeling Felix.xlsx
HI
211
322
433
544
655
766
877
Data Tables
Cell Formulas
RangeFormula
H2:H8H2=ROWS($H$2:$H2)
I2:I8I2=ROWS($N$2:$N2)


Since Dynamic formulas that return more than one array item are incompatible with Tables we use this to filter the result from the UNIQUE function

You could use any column, it doesn't matter.
 
Upvote 0
The formula
Excel Formula:
=ROWS($N$2:$N2)
gives you a sequence of numbers starting from 1 and incrementing as you drag down:

Prestons Playground for Modeling Felix.xlsx
HI
211
322
433
544
655
766
877
Data Tables
Cell Formulas
RangeFormula
H2:H8H2=ROWS($H$2:$H2)
I2:I8I2=ROWS($N$2:$N2)


Since Dynamic formulas that return more than one array item are incompatible with Tables we use this to filter the result from the UNIQUE function
Oh okay, cool! Thank you for the explanation. What happens if something is in N2 all of a sudden? I am planning to add numerous more data tables on this tab. Is that going to mess anything up? I tried testing a few different types of data, but wanted to check with the experts.
 
Upvote 0
Nothing will happen, but to avoid reference problems (if you delete exactly that column) you could change that to the same column as Progam in you BatchSize table like this:

Prestons Playground for Modeling Felix.xlsx
AB
1ProgramBatch Size
2Program 14
3Program 21
4Program 317
5Program 42
6Program 55
7Program 615
8Program 710
Data Tables
Cell Formulas
RangeFormula
A2:A8A2=CHOOSEROWS(UNIQUE(Dashboard[Program]),ROWS($A$2:$A2))
 
Upvote 0
Nothing will happen, but to avoid reference problems (if you delete exactly that column) you could change that to the same column as Progam in you BatchSize table like this:

Prestons Playground for Modeling Felix.xlsx
AB
1ProgramBatch Size
2Program 14
3Program 21
4Program 317
5Program 42
6Program 55
7Program 615
8Program 710
Data Tables
Cell Formulas
RangeFormula
A2:A8A2=CHOOSEROWS(UNIQUE(Dashboard[Program]),ROWS($A$2:$A2))
Oh awesome! So it doesn't so much care what is there, just that it has a row to reference!

Thank you very much and sorry for all of the confusion. This has been a massive project and I am not even 5% done but I think a lot of these formulas can help me piece together the rest of the excel workbook. In total, this workbook has over 200,000 calculations. I am trying to make it easier to manage.
 
Upvote 0

Forum statistics

Threads
1,216,122
Messages
6,128,964
Members
449,480
Latest member
yesitisasport

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