I have a table with n rows with data, the rows are required to be placed to the right.
Which is the chunk size, as shown
Make a copy of sheet here: https://docs.google.com/spreadsheets/d/1aitrEnBpL7VV_qiylF4d00tLcKq9efU99hdO-5fa1RM/copy
The chink size is a variable and when chunk is changed the formula needs to auto adjust the result.
I have tried with
=transpose(flatten(query(ARRAYFORMULA(A2:F8),"select * limit 4 offset 0")))
but my formula needs manual reasoning and update of the formula when the table changes which is not feasible. A single formula that does the job accepting chunk size is greatly appreciated.
>Solution :
You may try:
=let(a,B11*columns(A$2:F$8),b,roundup((rows(A2:F8)*columns(A2:F8))/a),makearray(b,a,lambda(r,c,iferror(index(flatten(A$2:F$8),(r-1)*a+c)))))
- for the reference I had the
chunk numberentered in the cellsB11andB17
If and when the new functions are active & operational fo ya; you can also use this simple one:
=wraprows(tocol(A2:F8),B11*columns(A2:F8),)


