Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Special sort for oldest and newest date

Hi!

I have a file that contains columns of:
SERIAL NUMBER, COMPANY, DATE of SALE, many other fields

In the end, I would like a report listing each company only once and showing
the oldest and newest date of sale (it would be nice to have the
corresponding serial numbers associated with the sale dat, but that's not
necessary).

131 Co_A 10/12/2005
222 Co_A 12/31/2005
123 Co_B 06/04/2006
555 Co_A 03/17/2006
324 Co_C 04/01/2006
299 Co_A 08/09/2006
484 Co_A 07/04/2006
814 Co_B 05/26/2005

Would like something like this:
Company Oldest Serial Newest Serial
Co_A 10/12/2005 131 08/09/2006 299
Co_B 05/25/2005 814 06/04/2006 123
Co_C 04/01/2006 324 04/01/2006 324

Is this possible without too much difficulty?

Thank you so much!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 341
Default Special sort for oldest and newest date

Here we go

PIVOT TABLES are what you need

1 add titles to your columns, and an extra column for the serial number

REF COMP DATE SERIAL
131 Co_A 10/12/2005 =C2-DATE(YEAR(C2)-1,12,31)
222 Co_A 12/31/2005 etc
123 Co_B 06/04/2006 etc

Format that serial number as a number (Format Cells)

2 Click on cell A1 and do data pivottable next finish

Drag company into the row field
Drag date into the space for data items
Right click where it says "count of DATE", do field settings and choose Max.
Format column B of your pivot table as a date.

Drag date into the space for data items again.
You will see a column called Data now.
Grab this column called data and drag it so that it is above the data area
(becoming a row not a column).
now you have 2 columns

right click on where it says Count of DATE, field settings, choose Min.

Now you have to drag in the SERIAL field twice, and set it as a max and a min.

you can change the order of the columns by selecting them and dragging them
around.

--
Allllen


"DTTODGG" wrote:

Hi!

I have a file that contains columns of:
SERIAL NUMBER, COMPANY, DATE of SALE, many other fields

In the end, I would like a report listing each company only once and showing
the oldest and newest date of sale (it would be nice to have the
corresponding serial numbers associated with the sale dat, but that's not
necessary).

131 Co_A 10/12/2005
222 Co_A 12/31/2005
123 Co_B 06/04/2006
555 Co_A 03/17/2006
324 Co_C 04/01/2006
299 Co_A 08/09/2006
484 Co_A 07/04/2006
814 Co_B 05/26/2005

Would like something like this:
Company Oldest Serial Newest Serial
Co_A 10/12/2005 131 08/09/2006 299
Co_B 05/25/2005 814 06/04/2006 123
Co_C 04/01/2006 324 04/01/2006 324

Is this possible without too much difficulty?

Thank you so much!

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
formula to calculate future date from date in cell plus days Chicesq Excel Worksheet Functions 8 November 3rd 05 12:25 PM
Excel 2003 "File Open": how keep folders at top with sort by Date. Aging Analyst Excel Discussion (Misc queries) 1 December 3rd 04 03:26 AM


All times are GMT +1. The time now is 05:06 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"