Sorting Groups of Rows

D

Dan

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!
 
A

Allllen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top