Moving contents of every other row up a row and one column to the right

Copper Contributor

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.

3 Replies


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.

Moving contents of every other row up.JPG



If you're looking to do this:


You could use:



If you need this:


Then go with this:

    r, ROWS(vector),
    seq, SEQUENCE(r / 2, , 1, 2),
    INDEX(vector, seq) & " " & INDEX(vector, seq + 1)



Power Query alternative attached (Thanks @OliverScheurich for the "template")