New Dynamic Table

Pestomania

Active Member
Joined
May 30, 2018
Messages
332
Office Version
  1. 365
Platform
  1. Windows
I am trying to get a few formulas to work more effectively:

1. In Cell V1, I'd like a formula that says if Cell B1 shows '23, it creates 12 months of 2023. This would be dynamic so that when I add '29, it would add enough columns for 2029 and so on.
2. In Cell V2, I have a formula that was created on tis article (Distributed Row Results) that allows for static formulas, but I would like to try and get cell V26 to work where it uses vlookups and index/match to change the dynamic of the table.

Hopefully this all makes sense. I am open to any recommendations if there are easier and more efficient methods of doing this. The final table is going to be over 20,000 cells of data.

Book4
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBE
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 '24Jan '25Feb '25Mar '25Apr '25May '25Jun '25Jul '25Aug '25Sep '25Oct '25Nov '25Dec '25
2Program 1805252608832Program 14Program 1488488488488444444444448444444444448
3Program 21620201325Program 21Program 2112112112112122122122122122122122122
4Program 3289238374391204272Program 317Program 3171734173417173417341734171717171734171717171734173434343434173434343434
5Program 4162218144244Program 42Program 4
6Program 512550109012515Program 55Program 5
7Program 610510515165360240Program 615Program 6
8Program 72504060160120180Program 710Program 7
9Program 8359835632135Program 87Program 8
10Program 9110706090110210Program 910Program 9
11Program 10814414412048176Program 108Program 10
12Program 11138108606010890Program 116Program 11
13Program 121523210414416880Program 128Program 12
14Program 1327331231252234117Program 1313Program 13
15Program 1421010518015120165Program 1415Program 14
16Program 152109048045069030Program 1530Program 15
17Program 16216180108144153216Program 169Program 16
18Program 1764464461656011256Program 1728Program 17
19Program 1818018288126126306Program 1818Program 18
20Program 193301352106010575Program 1915Program 19
21Program 208060140140130200Program 2010Program 20
22Program 212844844884112308Program 2128Program 21
23Program 226488151327675108Program 2227Program 22
24Program 2321628854108288270Program 2318Program 23
25Program 24176286528154110374Program 2422Program 24
26Program 2557520746069437460Program 2523Program 25#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
Sheet1
Cell Formulas
RangeFormula
W1:BE1W1=EOMONTH(V1,1)
U2:U26U2=UNIQUE(A2:A26)
V2:AG4V2=LET(z,B2/O2,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)*O2
AH2:AS4AH2=LET(z,C2/O2,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)*O2
AT2:BE4AT2=LET(z,D2/O2,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)*O2
V26:AG26V26=LET(z,(INDEX(Sheet1!$B$2:$G$26,MATCH(1,($U26=Sheet1!$A$2:$A$26)*("'"&RIGHT(YEAR(V$1),2)=Sheet1!$B$1:$G$1),0)))/VLOOKUP($U26,Sheet1!$N$1:$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($U26,Sheet1!$N$1:$O$26,2,FALSE)
Dynamic array formulas.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I was able to modify a let formula that was created before as well as work on a new date sequence formula that built the table I needed:

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 1488488488488444444444448
3Program 21620201325Program 21Program 2112112112112122122122122
4Program 3289238374391204272Program 317Program 3171734173417173417341734171717171734171717171734
5Program 4162218144244Program 42Program 4022022022022022222222222
6Program 512550109012515Program 55Program 5101010101010101010101015055555055555
7Program 610510515165360240Program 615Program 601501501515015015150150150151501501515
8Program 72504060160120180Program 710Program 72020202020202020202020300010001000100010
9Program 8359835632135Program 87Program 800707007070777777147777714
10Program 9110706090110210Program 910Program 9010101010101010101010100100100101001001010
11Program 10814414412048176Program 108Program 10000000000008816816816816816816
12Program 11138108606010890Program 116Program 1161212121212121212121212612612612612612612
13Program 121523210414416880Program 128Program 128168168161681681616008008008008
14Program 1327331231252234117Program 1313Program 13132626261326262613262626262626262626262626262626
15Program 1421010518015120165Program 1415Program 141515151515301515151515300150150151501501515
16Program 152109048045069030Program 1530Program 150300300303003003030000300003000030
17Program 16216180108144153216Program 169Program 1618181818181818181818181891818918189181891818
18Program 1764464461656011256Program 1728Program 17285656565656565656565656285656565656565656565656
19Program 1818018288126126306Program 1818Program 1801818181818018181818180000000000018
20Program 193301352106010575Program 1915Program 19153030303030153030303030015151501515150151515
21Program 208060140140130200Program 2010Program 2001010010100101001010010010010010010010
22Program 212844844884112308Program 2128Program 210000000000028282856282856282856282856
23Program 226488151327675108Program 2227Program 22545454545454545454545454000270002700027
24Program 2321628854108288270Program 2318Program 23181818181818181818181818181836181836181836181836
25Program 24176286528154110374Program 2422Program 2402222022220222202222222222222222222222222244
26Program 2557520746069437460Program 2523Program 25464646464646464646464669023232302323230232323
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:AS26V2=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),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($U2,$N$2:$O$26,2,FALSE),MOD(SEQUENCE(1,12,0),12)+1)
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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