ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prioritising on dates (https://www.excelbanter.com/excel-programming/325913-prioritising-dates.html)

Bob

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

Pete McCosh

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


Mike Fogleman

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




Bob

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



All times are GMT +1. The time now is 03:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com