Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Prioritising on dates

I have a range of dates in one column, I need to prioritise against these
dates. For example, in order to define a priority if I have a date of the
12/02/05 and a date of the 25/03/05, then the earlist date is a priority 1
etc. There are around 30 different dates, so the priority number will go up
to 30 (in this case, where the same date exists they will have the same
priority number). Does anyone know of a way of doing this?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Prioritising on dates

Bob,

assuming your list of dates is in A2:A30, then in B2 type:

=Rank($A2,$A$2:$A$30,1)

and copy this formula down to B30. It show's the position of the value in A2
within the array of values in A2 to A30. The ",1" at the end makes it rank in
ascending order as the default is desending.

Cheers, Pete

"BOB" wrote:

I have a range of dates in one column, I need to prioritise against these
dates. For example, in order to define a priority if I have a date of the
12/02/05 and a date of the 25/03/05, then the earlist date is a priority 1
etc. There are around 30 different dates, so the priority number will go up
to 30 (in this case, where the same date exists they will have the same
priority number). Does anyone know of a way of doing this?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Prioritising on dates

Bob, you can use the Rank function on your date list. If your dates are in
cells A1:A31, then in another column put this formula in row 1 and fill-down
to row 31...

=RANK(A1,$A$1:$A$31,1)

It will Rank the serial number Excel uses to represent dates. The older the
date, the smaller the serial number. So we use a 1 in the Rank formula to do
a reverse order (smaller numbers rank highest).

Mike F
"BOB" wrote in message
...
I have a range of dates in one column, I need to prioritise against these
dates. For example, in order to define a priority if I have a date of the
12/02/05 and a date of the 25/03/05, then the earlist date is a priority 1
etc. There are around 30 different dates, so the priority number will go
up
to 30 (in this case, where the same date exists they will have the same
priority number). Does anyone know of a way of doing this?

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Prioritising on dates

That worked - great stuff, thanks

"BOB" wrote:

I have a range of dates in one column, I need to prioritise against these
dates. For example, in order to define a priority if I have a date of the
12/02/05 and a date of the 25/03/05, then the earlist date is a priority 1
etc. There are around 30 different dates, so the priority number will go up
to 30 (in this case, where the same date exists they will have the same
priority number). Does anyone know of a way of doing this?

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
Linking computer dates (time) to spreadsheet dates that have formu bigisle Excel Worksheet Functions 3 January 3rd 10 08:05 PM
Stop dates from showing as numbers - when formated as dates JR Excel Discussion (Misc queries) 1 October 29th 08 04:38 PM
Toggle a range of Julian dates to Gregorian Dates and Back PSKelligan Excel Programming 4 May 8th 07 05:51 AM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
Charting data against dates where dates are not at fixed intervals PK Charts and Charting in Excel 4 June 16th 05 05:08 AM


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