Question

I have a libreoffice sheet that I would like to have the rows increase by 1

example:
1
2
3
4

The problem is I know I can do this with autofill but I have 50000 rows and dragging down takes awhile.

Thanks

Was it helpful?

Solution

Assuming that you already have data up to row 50'000, and you have an empty column (I'll use Col. A) for the series.

Jump to the last cell in one of the "used" columns Ctrl + Arrow down (or scroll all the way down to Cell A50000) then move sideways to Col. A and place an "X" in cell A50000. You now have an empty column A, with an "X" in cell A50000.

Go to cell A1 ( Ctrl + Home ). Put the number "1" in cell A1. Put the following (secret!) formula in cell A2:

=A1+1

Copy cell A2 with Ctrl+c Stay in Cell A2...
Press Ctrl+Shift+Arrow down, The area from A2 to A50000 should now be highlighted.
Press Ctrl+v to paste the formula all the way down...

IMPORTANT!
Press Ctrl+c to copy the just pasted data (A2..A50000).
Press Ctrl+Shift+v to paste the just copied data "over" the original data with "paste special".

In "Paste Special" make sure that you have NOT selected the option: Formulas.
This will now paste all the results of the formulas back as fixed numbers.

This should take less than a minute, of which most of it is waiting for the system to calculate and to paste (I tried it for 1 mio lines..)

By just changing the formula from =A1+1 to =A1+2, jou can jump with 2, so 1,3,5,7,... But I assume that you'll use this column as a reference for sorting, so you can always go back to the original order.

Have fun!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top