LibreOffice Calc move every nth row


I have a text document with every line in the A column. I want to move every second cell into the B column one cell above, and then delete the empty row. Exactly how do I do this? I am not familiar with using LibreOffice Calc, so please explain it to me with detailed instructions. Thank you.

image description

image description


another solution:

  • Put the following formula to cell B1: =OFFSET($A$1,(COLUMN()-1)+(ROW()-1)*2-1,0)
  • Drag the formula to cell C1 (or just copy)
  • Select cells B1:C1
  • Drag copy down to row 5 (now cells B1 to C5 should show what you want to achieve; attached sample file is at this stage)
  • Select columns B:C
  • Perform Data -> Calculate -> Formula to Value
  • Delete column A

See the following sample file: ArrangeEveryNth.ods

Hope that helps.

If the answer is correct or helped you to solve your problem, please click the check mark (:heavy_check_mark:) next to the answer.

This is very good. Thanks for the help. I have one additional question. What would the formula be if you had say 5 rows of data at a time that you wanted to move into adjacent columns? The same thing, but instead of two.

:slight_smile: should have pointed out where the N in my formula is:

N=2: =OFFSET($A$1,(COLUMN()-1)+(ROW()-1)*2-1,0)   
N=3: =OFFSET($A$1,(COLUMN()-1)+(ROW()-1)*3-1,0) 
N=4: =OFFSET($A$1,(COLUMN()-1)+(ROW()-1)*4-1,0)  
N=5: =OFFSET($A$1,(COLUMN()-1)+(ROW()-1)*5-1,0)

Very helpful. Thanks again.

Thank you so much!

Hi i have a similar but simplest thing to do i have a large work sheet which i want to move all the odd’s row two rows bellow, the 1 to the 3, the 3 to the 5 the 5 to the 7 etc… you can help me on that? I also wanted you to explain me parameters of the formula you use to i understand how it works if that is not hard for you…
Thank you!

Select the first two Rows… and in the Context_Menu of the Rows choose Insert Rows above


Karolus, thanks for the quick reply but i am afraid i was not clear, i don’t want to go all the rows two rows down, i want go two rows down only the odd rows. See the attached pic my worksheet is about 2500 rows like the pic, i want all the odd rows with the text to be under the even rows with the numbers.

oh I see…
in a new sheet enter:


into A1 and A2, select both and pull down.

please next time start a new topic instead reanimating a five year old one

ok i will do it right then … i will open a new topic.

Insert a further row in the beginning of the sheet. Write in A1 Content and in B1 Number.

Number column B this way: 1-2-1-2-1-2 or A-B-A-B… downwards. Do this: Insert in B2 A and in B3 B. Select cells B2 and B3 and cut the content out (CTRL+X). Then select B2 to B10 (or more) and insert clipboard. It will have the form of A-B-A-B-A… or 1-2-1-2-1-2 …

Select A1 and B1 and (Data menu) insert AutoFilter.

B1 contains filters (1 and 2 or A and B). Select 1 (or A) in filter.
Copy values of column A.
Create a new sheet and insert clipboard in A1 (or B1).
Go back to first sheet and select 2 (or B) in filter. Copy and paste into sheet 2.

Probably there’s a more elegant solution?