ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I sort by month and day (https://www.excelbanter.com/excel-discussion-misc-queries/38273-how-do-i-sort-month-day.html)

CVSTANFORD

How do I sort by month and day
 
I want to sort multiples dates by day and month, but NOT year. Basically to
put all of our birthdays in order for the year.........

Gary's Student

Let's assume that all your dates are some column, say column B
In another column, enter the formula =MONTH(B1) and copy down.
In a third column, enter =DAY(B1) and copy down.

Then sort the data by month and then by day.
--
Gary's Student


"CVSTANFORD" wrote:

I want to sort multiples dates by day and month, but NOT year. Basically to
put all of our birthdays in order for the year.........


Eric Conditt



"CVSTANFORD" wrote:

I want to sort multiples dates by day and month, but NOT year. Basically to
put all of our birthdays in order for the year.........


You could take out the month and day from the string and sort them that way.

Put this in cell B1 of a new book and put a date in cell A1...

=VALUE(MONTH(A1)&"/"&DAY(A1))

If you entered a date like 2/14/1977 it would take that and change it into
2/14/(2005 or current year). Once you have a column created you can just sort
by that.

A B
2/14/1977 2/14/2005
4/5/2000 4/5/2005
4/11/2000 4/11/2005
4/12/1980 4/12/2005
4/29/1981 4/29/2005
5/21/2004 5/21/2005


Eric Conditt

The formula got messed up on the HTML display :(

You would need to write it like...

=VALUE(MONTH(A1)&(double quote)/(double quote)& DAY(A1))

sorry about that, if you are unsure about what I mean just hit reply to this
and it will display the formula corretly in the text box.

=VALUE(MONTH(A1)&"/"&DAY(A1))

"Eric Conditt" wrote:



"CVSTANFORD" wrote:

I want to sort multiples dates by day and month, but NOT year. Basically to
put all of our birthdays in order for the year.........


You could take out the month and day from the string and sort them that way.

Put this in cell B1 of a new book and put a date in cell A1...

=VALUE(MONTH(A1)&"/"&DAY(A1))

If you entered a date like 2/14/1977 it would take that and change it into
2/14/(2005 or current year). Once you have a column created you can just sort
by that.

A B
2/14/1977 2/14/2005
4/5/2000 4/5/2005
4/11/2000 4/11/2005
4/12/1980 4/12/2005
4/29/1981 4/29/2005
5/21/2004 5/21/2005


Bob Phillips

Add a formula of =TEXT(A1,"mmdd") in an adjacent column, copy down, sort
both columns with the helper column as key.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"CVSTANFORD" wrote in message
...
I want to sort multiples dates by day and month, but NOT year. Basically

to
put all of our birthdays in order for the year.........




CVSTANFORD

It works great Bob! Thanks so much!!!

"Bob Phillips" wrote:

Add a formula of =TEXT(A1,"mmdd") in an adjacent column, copy down, sort
both columns with the helper column as key.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"CVSTANFORD" wrote in message
...
I want to sort multiples dates by day and month, but NOT year. Basically

to
put all of our birthdays in order for the year.........






All times are GMT +1. The time now is 09:06 AM.

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