#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Sort

I had a spreadsheet emailed to be. I would like to sort it, but there are
several rows that need to be sorted together as one row. For example in A1 I
have John Smith and in B1, B2, B3 I have dates. In A4 I have Jill Brown and
B4, B5,and B6 I have more dates. I need rows 1-3 to sort together and rows
4-6 to sort together. Right now when I sort the rows 1 and 4 sort and excel
puts row 2,3, 5, and 6 at the bottom. Can you help?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Sort

Excel doesn't like this kind of layout.

But you have a couple of options.

Insert a couple of new columns (say A and B) and use column A to contain the
unique identifier on each row of the group. Then in column B, you can use an
indicator (1, 2, 3, ...) that will be used as the secondary key. (So your data
can stay in order per group.)

The other option (that I can think of) is to "flatten" your data--only if you
have enough columns. Put row 2 of each group in the cells to the right of the
first row. Then row 3 moves to the right of that 2nd row's data.

Then sort your data (one record per entry).

You could even dump the sorted data into the same kind of 3 row format that you
started with.

Starbright wrote:

I had a spreadsheet emailed to be. I would like to sort it, but there are
several rows that need to be sorted together as one row. For example in A1 I
have John Smith and in B1, B2, B3 I have dates. In A4 I have Jill Brown and
B4, B5,and B6 I have more dates. I need rows 1-3 to sort together and rows
4-6 to sort together. Right now when I sort the rows 1 and 4 sort and excel
puts row 2,3, 5, and 6 at the bottom. Can you help?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sort

Assuming A2 and A3 are blank, you could add the name to those cells.

Select column A and F5SpecialBlanksOK

Type an = sign in active blank cell the point or arrow up to the cell above.

Hit CTRL + ENTER to add the names to blank cells.

Copy Column A and in place EditPaste SpecialValuesOKEsc


Gord Dibben MS Excel MVP

On Tue, 8 Jul 2008 05:44:02 -0700, Starbright
wrote:

I had a spreadsheet emailed to be. I would like to sort it, but there are
several rows that need to be sorted together as one row. For example in A1 I
have John Smith and in B1, B2, B3 I have dates. In A4 I have Jill Brown and
B4, B5,and B6 I have more dates. I need rows 1-3 to sort together and rows
4-6 to sort together. Right now when I sort the rows 1 and 4 sort and excel
puts row 2,3, 5, and 6 at the bottom. Can you help?


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
Sort sheet based on particuilar sort order Also Excel Worksheet Functions 4 January 3rd 08 09:31 AM
sort function for dates does not sort properly in Office 2007 Exc. Rosalie Excel Worksheet Functions 1 November 22nd 07 10:25 PM
data, sort option is grayed. how to sort on a column? Steve Richter Excel Discussion (Misc queries) 1 September 25th 07 03:25 PM
Excel sort by Fill Color by custom list sort Dash4Cash Excel Discussion (Misc queries) 2 July 29th 05 10:45 PM
Excel Sort function should not sort the cell formatting! Lisa D.N.1 Excel Worksheet Functions 1 December 28th 04 08:37 PM


All times are GMT +1. The time now is 04:17 PM.

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

About Us

"It's about Microsoft Excel"