Forum Discussion
Olivier960
Mar 12, 2023Copper Contributor
[Excel 365] Positioning a list of values as a "staircase" with dynamic array
Good day dear Excel community I'm scratching my head around a formula I need to write to create the range on the right with a dynamic array. I need to do the following transformation using a ...
- Mar 12, 2023
It's a rare occasion that MUNIT gets some work.
=LET(r,ROWS(Input),matrix,MUNIT(r)*Input,CHOOSECOLS(matrix,INT(SEQUENCE(r*rep,,MIN(Input),1/rep))))
HansVogelaar
Mar 12, 2023MVP
Assuming that you have Microsoft 365 or use Excel Online:
=LET(n, COUNTA(SourceTable[SourceRange]), MAKEARRAY(n, Repeats*n, LAMBDA(r, c, IF((c>=Repeats*(r-1)+1)*(c<=Repeats*r), INDEX(SourceRange, r),""))))
SourceTable is the table in A2:A6
The data range of this table has been named SourceRange.
Repeats is a named cell that contains the number of times each value should be repeated.
Sample workbook attached.
Olivier960
Mar 12, 2023Copper Contributor
Thanks Hans, this works quite well!
Really appreciate the help received in such a timely manner.
Really appreciate the help received in such a timely manner.