OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[Solved] Reverse the order of rows in very big sheet

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
xwtiko
Newbie
Newbie


Joined: 23 May 2012
Posts: 2

PostPosted: Wed May 23, 2012 1:22 pm    Post subject: [Solved] Reverse the order of rows in very big sheet Reply with quote

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
View user's profile Send private message
ozzie
OOo Advocate
OOo Advocate


Joined: 29 Jul 2010
Posts: 400
Location: victoria

PostPosted: Wed May 23, 2012 2:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Wed May 23, 2012 4:48 pm    Post subject: Re: Reverse the order of rows in very big sheet Reply with quote

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
View user's profile Send private message
xwtiko
Newbie
Newbie


Joined: 23 May 2012
Posts: 2

PostPosted: Wed May 23, 2012 11:00 pm    Post subject: Reply with quote

Thank you for the answers.

Ken your solution solved my problem. I wish I know that earlier.

Thanks again!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group