Function that returns the month name

R

Rapunzel

How can I create a function that returns the month name given only the number
of the month (1-12)? I do not want to lookup a separate table inside my
worksheet.
 
L

Leo Heuser

Followup to newsgroup only please.
Rapunzel said:
How can I create a function that returns the month name given only the
number
of the month (1-12)? I do not want to lookup a separate table inside my
worksheet.

Here's one way:

Assuming month number in A2, enter

=DATE(,A2+1,)

in e.g. B2. Format B2 as "mmmm" without quotes.
 
T

T. Valko

Try this:

For the short month: Jan, Feb, Mar, etc

=TEXT(A1*30,"mmm")

For the long month: January, February, March, etc

=TEXT(A1*30,"mmmm")

You might want to make it a little more robust by checking that A1 does in
fact contain a number from 1 to 12:

=IF(AND(A1>=1,A1<=12),TEXT(A1*30,"mmm"),"")

Biff
 
Top