[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

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
ozzie

Joined: 29 Jul 2010
Posts: 381
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).
ken johnson
Super User

Joined: 23 Apr 2009
Posts: 1986
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
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!
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
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