Function that returns the month name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
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
 

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

Back
Top