| View previous topic :: View next topic |
| Author |
Message |
xwtiko Newbie

Joined: 23 May 2012 Posts: 2
|
Posted: Wed May 23, 2012 1:22 pm Post subject: [Solved] Reverse the order of rows in very big sheet |
|
|
I open a some large .csv files with more than 5000 rows. I need an easy and fast way to reverse the order of the rows and I do not have a column with an auto increment or date value that I could use to do that.
Creating another column by dragging the automatic fill handle for 5000 is not very efficient, especially if I have to do every 10 days.
Is there any other way to reverse the order of the rows so that 1 <--> 5000 , 2 <--> 4999 , 3 <--> 4998 and so on. 5000 is a random number. Each file has different number of rows.
Thanks!
Last edited by xwtiko on Wed May 23, 2012 10:50 pm; edited 1 time in total |
|
| Back to top |
|
 |
ozzie OOo Advocate

Joined: 29 Jul 2010 Posts: 316 Location: victoria
|
Posted: Wed May 23, 2012 2:31 pm Post subject: |
|
|
I think this works
Create a helper column with this formula it needs to be dragged down well passed your possible maximum row number (but it only needs to be done the once!) which I have taken to be 10,000
| Code: | | =IF(A1=0;"";COUNTA($A$1:$A$10000)-ROW(A1)+1) |
By doing all data sorts using the helper column (which changes with the addition or subtraction of data) as the sort by column, and changing the ascending or descending option, it should do what you want. _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1845 Location: Sydney, Australia
|
Posted: Wed May 23, 2012 4:48 pm Post subject: Re: Reverse the order of rows in very big sheet |
|
|
| xwtiko wrote: |
Creating another column by dragging the automatic fill handle for 5000 is not very efficient, especially if I have to do every 10 days. |
If there are no gaps in the adjacent column then double-clicking the fill handle fills down to the 5000th (or whatever) row.
Ken Johnson |
|
| Back to top |
|
 |
xwtiko Newbie

Joined: 23 May 2012 Posts: 2
|
Posted: Wed May 23, 2012 11:00 pm Post subject: |
|
|
Thank you for the answers.
Ken your solution solved my problem. I wish I know that earlier.
Thanks again! |
|
| Back to top |
|
 |
|