date sorting

J

Jim

Hi,

I have a spreadsheet with lots of employees' info. One of the columns is
date of birth: mm/dd/yyyy. I would like to be able to sort them by month, if
possible. I can get the month in numerical form by using =month(a2), but I
can't seem to convert that numerical value into the name of the month.

can anyone help?
 
T

T. Valko

How do you want to sort? If you sort by month number you'll get:

Jan
Feb
Mar
Apr

Which is the same as simply sorting by the date itself.

If you sort by month name you'll get:

Apr
Feb
Jan
Mar

One way to get the month name as a TEXT value:

A2 = some date

=TEXT(A2,"mmm") for the short month name: Apr

=TEXT(A2,"mmmm") for the long month name: April

Biff
 
J

Jim

Biff,

thanks - the text() feature did what I needed, and I can sort by name after
that. But I'm puzzled by this:
If you sort by month name you'll get:

Apr
Feb
Jan
Mar

can I sort a column of dates mm/dd/yyyy by month *alone*, and how would
sorting by month name yield April, then February, etc?

Jim
 
T

T. Valko

can I sort a column of dates mm/dd/yyyy by month *alone*

Not unless you use a helper column with a formula that returns the month
number:

=MONTH(A1)
how would sorting by month name yield April, then February, etc?

If you use the TEXT function to get the month name and then use this as the
sort key. I think we have a misunderstanding on this.

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top