Jun 01 2023 07:24 AM
I have a large table where the data was incorrectly stored. I need to move the data from the even rows up one row and to the right one column and then delete the empty rows. Is there a way to do this programmatically? Example: Cell (1,1) and (2,1) needs to be Cell (1,1) (Unchanged) and (1,2) then deleting row 2.
Jun 01 2023 08:18 AM
You can try a solution with Power Query. In the attached file you can add data to the blue dynamic table. Then you can click in any cell of the green table and right-click with the mouse and select refresh to update the green result table.
Jun 01 2023 08:21 AM
If you're looking to do this:
You could use:
=WRAPROWS(vector,2)
If you need this:
Then go with this:
=LET(
r, ROWS(vector),
seq, SEQUENCE(r / 2, , 1, 2),
INDEX(vector, seq) & " " & INDEX(vector, seq + 1)
)
Jun 01 2023 09:20 AM
Power Query alternative attached (Thanks @OliverScheurich for the "template")