Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DexterV
 
Posts: n/a
Default Sort by group


In my table, I have a column with dates and a second one with events.
The table is sort by events, then by dates.

Now, I would like to know if there is a possibility to make a third
sort in "chunks". In other words, it would sort the groups by the first
date of each group of events.

Thanks


--
DexterV
------------------------------------------------------------------------
DexterV's Profile: http://www.excelforum.com/member.php...o&userid=24969
View this thread: http://www.excelforum.com/showthread...hreadid=384949

  #2   Report Post  
Ron Coderre
 
Posts: n/a
Default


I think a Pivot Table might work for you:

Select the table range
DataPivot Table
-Excel List.....[Next]
-Range is already selected.....[Next]
-[Layout]:
-----ROW: Event
-----DATA: Date
Double-Click Date and select MIN and format as date
Select Pivot Table location......[Finish]

That will generate a list of events with the earliest date for that
event.

Does that help?

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=384949

  #3   Report Post  
Ron Coderre
 
Posts: n/a
Default


You might want to try using this Pivot Table approach:

Assumptions are that the data is sorted by group, then by date.
This example is for a list in Cells A1:B100, A1 and B1 contain column
headings Event and Date, respectively

Add a column to the right of the table (col C) and label it StartDate
Run this formula in C2 and copy it down:
=VLOOKUP(A28,$A$2:$B$100,2,1)

Then:
Select the table range, A1:C100

DataPivot Table
-Excel List.....[Next]
-Range is already selected.....[Next]
-[Layout]:
-----ROW: StartDate, Event, Date
-----DATA: Date

Double-Click StartDate and select Advanced, Sort Ascending
Double-Click Date (in the DATA section) and select COUNT

Select the Pivot Table location......[Finish]

That will generate a grouped list of events sorted by the events with
the earliest starting dates.

Does that help?

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=384949

  #4   Report Post  
DexterV
 
Posts: n/a
Default


Thanks Ron for that procedure.

I recreated your example, but Excel tells me there is an error in the
first formula : =VLOOKUP(A28,$A$2:$B$100,2,1)

Any idea?


--
DexterV
------------------------------------------------------------------------
DexterV's Profile: http://www.excelforum.com/member.php...o&userid=24969
View this thread: http://www.excelforum.com/showthread...hreadid=384949

  #5   Report Post  
Ron Coderre
 
Posts: n/a
Default


Formula typo
=VLOOKUP(A28,$A$2:$B$100,2,1)

should be
=VLOOKUP(A2,$A$2:$B$100,2,1)

(either my fingers are too big or the keyboard is too small, or both)

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=384949

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
How do I sort a group of calculated cells in Excel? Benny cannot figure otu the solution Excel Worksheet Functions 2 July 5th 05 08:55 PM
Excel sort option disabled--file name followed by "group" at top . Margaret Excel Discussion (Misc queries) 1 April 7th 05 04:20 PM
Trying to group cells so that I can sort the upper most cell with. magnetoworld New Users to Excel 8 March 14th 05 07:17 PM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM
vba to sort group copy paste to another sheet mango Excel Worksheet Functions 0 November 5th 04 04:27 AM


All times are GMT +1. The time now is 11:14 PM.

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"