in b1:d5, i have these data:
width,height
3,4
4,3
3,4
5,5
width represents the width of data (eg. 3 means 3 numbers) horizontally.
Height represents how many these data will be repeated vertically.
in b9:e19 i would like to produce these data.
as you can see, horizontally numbers are incremental until the given width.
How i can produce these data from width and height in librecalc?
chatgpt failed to give me a working solution
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3,4
1,2,3,4
1,2,3,4
1,2,3,4,5
1,2,3,4,5
1,2,3,4,5
1,2,3,4,5 1,2,3,4,5
opengpt suggested this formula. but it does not stop to produce more than i want
=IF(COLUMN()-COLUMN($B$9)+1 <= INDEX($B$2:$B$5; MATCH(ROW()-ROW($B$9)+1; $D$2:$D$5; 1)); COLUMN()-COLUMN($B$9)+1; "")
it is based on cumulative height in “d column”