Create array based on cell reference

mbarbera83

New Member
Joined
Feb 17, 2015
Messages
27
Hi all.

I have a list of data that I need an array created

ABC
1X20194
2Y201310
3Z20158
4

I have Tried MakeArray with Lambda, but i cant seem to get it right I need the array to populate the following, 1 column with multiple rows, number of rows determined by column C, and the value of each row to be the starting point in Column B, + 1 year for each row
Start with the year in B1, and then add 1 year on for each row - number of rows determined by column C - in this case 4 rows of X



B1
B1 + 1
B1 + 1 + 1
B1 + 1 + 1 + 1
B2
B2 + 1
B2 + 1 +1 - this to continue for 10 rows

I would really appreciate help in this regard.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
You're welcome & thanks for the feedback.
Fluff. There seems to be an error from U36, as well as the starting point of U3 isn't starting on the correct date?


U12019
U12020
U12021
U12022
U32022
U32023
U32024

U352026
U362021
U36#N/A
U36#N/A
U36#N/A
 
Upvote 0
That's because of the zeros, try
Excel Formula:
=LET(s,SCAN(0,C2:C51,LAMBDA(a,b,a+b)),x,SEQUENCE(MAX(s)),HSTACK(XLOOKUP(x,s,A2:A51,,1),XLOOKUP(x,s,B2:B51,,1)+DROP(REDUCE(0,FILTER(C2:C51,C2:C51<>0),LAMBDA(x,y,VSTACK(x,SEQUENCE(y,,0)))),1)))
 
Upvote 0
Solution
That's because of the zeros, try
Excel Formula:
=LET(s,SCAN(0,C2:C51,LAMBDA(a,b,a+b)),x,SEQUENCE(MAX(s)),HSTACK(XLOOKUP(x,s,A2:A51,,1),XLOOKUP(x,s,B2:B51,,1)+DROP(REDUCE(0,FILTER(C2:C51,C2:C51<>0),LAMBDA(x,y,VSTACK(x,SEQUENCE(y,,0)))),1)))
Fantastic! thank you
 
Upvote 0

Forum statistics

Threads
1,215,696
Messages
6,126,267
Members
449,308
Latest member
VerifiedBleachersAttendee

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