Forum Discussion
Vaibhav002
Sep 11, 2023Copper Contributor
Rearranging value in an excel table (Transpose is not working for the desired output)
Hi, I have a set of LARGE data in excel table and I am looking to rearrange the data for the same table.I have attached the sample input table and re-arranged output in the file.Please let me kn...
PeterBartholomew1
Sep 11, 2023Silver Contributor
It should be possible to achieve this with TOCOL and WRAPROWS alone but thinking it through is painful. I have used the fact that the array can conveniently be divided into two, rearranged and, finally, reassembled.
= LET(
n, COLUMNS(array) / 2,
array1, TAKE(array,,n),
array2, DROP(array,,n),
VSTACK(TOROW(array1), TOROW(array2))
)
A more 'nuts and bolts' approach would to calculate indices and then put the result together with MAKEARRAY and INDEX.