Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default Sorting Groups of Rows

Because I am using data exported from another program, my spreadsheet looks
has multiple rows of data for each "item" I wish to sort. For example:

Column A Column B Column C Column D

Row 1 Dan
Row 2 Cars 5
Row 3 Tires 20
Row 4 Bill
Row 5 Cars 3
Row 6 Tires 24
Row 7 Jessica
Row 8 Cars 9
Row 9 Tires 18

Is there any way that I could "group" lines 1-3 and 5-7 and then sort based
on one piece of data (e.g. the number of tires) so that each group stays
together following the sort. Ideally the above example (if sorted in
descending order by the number of tires) would end up as this:

Row 1 Bill
Row 2 Cars 3
Row 3 Tires 24
Row 4 Dan
Row 5 Cars 5
Row 6 Tires 20

Row 7 Jessica
Row 8 Cars 9
Row 9 Tires 18

I am hoping that there is another way than simply getting everything on to
one row and then sorting the regular way. Any help? Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 341
Default Sorting Groups of Rows

I am imagining that the columns as you have them are A,B,C

So add a new column D

in D1 write =A1
in D2 write =IF(A2="",D1,A2)
extend D2 downwards all the way

now you have column D which is the same as column A but no empty cells

now you can just sort the whole lot by column D ascending
--
Allllen


"Dan" wrote:

Because I am using data exported from another program, my spreadsheet looks
has multiple rows of data for each "item" I wish to sort. For example:

Column A Column B Column C Column D

Row 1 Dan
Row 2 Cars 5
Row 3 Tires 20
Row 4 Bill
Row 5 Cars 3
Row 6 Tires 24
Row 7 Jessica
Row 8 Cars 9
Row 9 Tires 18

Is there any way that I could "group" lines 1-3 and 5-7 and then sort based
on one piece of data (e.g. the number of tires) so that each group stays
together following the sort. Ideally the above example (if sorted in
descending order by the number of tires) would end up as this:

Row 1 Bill
Row 2 Cars 3
Row 3 Tires 24
Row 4 Dan
Row 5 Cars 5
Row 6 Tires 20

Row 7 Jessica
Row 8 Cars 9
Row 9 Tires 18

I am hoping that there is another way than simply getting everything on to
one row and then sorting the regular way. Any help? Thanks!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting into Groups equal size tay4432 Excel Worksheet Functions 2 June 28th 07 01:00 AM
Sorting with groups ecounts Excel Discussion (Misc queries) 0 July 19th 06 07:04 PM
Sorting by Groups grendel Excel Discussion (Misc queries) 0 March 27th 06 05:41 PM
How can I sort in groups of 3 rows? Blue Excel Worksheet Functions 1 November 15th 05 10:11 PM
Sum rows in groups sandy Excel Worksheet Functions 5 August 12th 05 12:03 AM


All times are GMT +1. The time now is 01:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"