date sort

ptebo

New Member
Joined
Apr 29, 2002
Messages
6
We have a spreadsheet that contains employees anniversary dates for each month. We need to sort the list by the day the employee started work. Is there a way to sort by the specific anniversary day (i.e. all of the employees hired on the 1st of the month, then the 2nd, etc. regardless of the year they were hired)instead of the numeric equivalent of the anniversary date which results in the dates being sorted first by the year?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
You could add a column with the formula
=TEXT(A1,"m-d")
where your dates are col A.

Sort by this new column

good luck
 
Upvote 0
Changing it to text still didn't allow me to do the needed sort. What I ended up doing was using the formula =DAY(A1) (assuming my first date was in cell A1). This formula pulled just the day into a new column. After copying the formula where needed, I was able to sort my list first by the new day column, then by my original date column. This enabled me to display my list in order by the day the employee started and then by the year they started.
 
Upvote 0
On 2002-04-30 11:19, ptebo wrote:
We have a spreadsheet that contains employees anniversary dates for each month. We need to sort the list by the day the employee started work. Is there a way to sort by the specific anniversary day (i.e. all of the employees hired on the 1st of the month, then the 2nd, etc. regardless of the year they were hired)instead of the numeric equivalent of the anniversary date which results in the dates being sorted first by the year?

Wait a minute. Read what you said? Give 3 to 5 real dates picked randomly in the there natural order and then the same group sorted, please. Then re-state your sort order for us, please

This stuff really works, trust me.

Rocky...
This message was edited by Rocky E on 2002-04-30 16:31
 
Upvote 0
Hi Guys:
Using the text value for cell A2 in an adjacent still keeps the memory of the year while sorting, so if the year has to be neglected, so for a corresponding date in cell A2, I want to put the following formula in cell B2 ...

=MONTH(A2)&"-"&DAY(A2)

then drag down
then sort on column B in ascending order.

Hope This Helps!

N.B.
I checked with IML and RockyE's formulation -- these do work if you coerce their text values to numeric values, say with +0 before sorting.



_________________
Yogi Anand

Edit: Deleted inactive website from hardcoded signature
This message was edited by Yogi Anand on 2003-01-19 13:29
 
Upvote 0

Forum statistics

Threads
1,214,620
Messages
6,120,559
Members
448,970
Latest member
kennimack

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top