Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Function that returns the month name

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 266
Default Function that returns the month name

Followup to newsgroup only please.
"Rapunzel" skrev i en meddelelse
...
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.


--
Best regards
Leo Heuser


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Function that returns the month name

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

"Rapunzel" wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
List of functions contained in the add-ins, esp. Analysis Toolpak Neil Goldwasser Excel Worksheet Functions 3 January 12th 07 12:43 PM
INT Function Returns 1 bhavesh Excel Worksheet Functions 3 December 29th 06 02:48 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 03:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"