Using numbers for months (1-12)

alphaexcel

Board Regular
Joined
Apr 21, 2008
Messages
87
Is there any way to bring across a month value based on the numbers 1-12?

Can do weekdays etc, but not month i.e. if A1 = 5, then show the month value, which would be May?

Cheers
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

schielrn

Well-known Member
Joined
Apr 4, 2007
Messages
6,941
You could do something like this:

=CHOOSE(A1,"January","February","March","April","May")

Or you could use the date function combined with the text function to return month:

=TEXT(A1&"/01/2008","mmm")

Hope that helps.
 
Upvote 0

JimmyG

Board Regular
Joined
Aug 16, 2005
Messages
70
Hope I've understood correctly....

assuming a month number in cell A1, enter in B1:

=CHOOSE(A1,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

Can also be adapted for QTRs
=CHOOSE(A1,"Q1","Q1","Q1","Q2".... etc



Regards, JimmyG
 
Upvote 0

alphaexcel

Board Regular
Joined
Apr 21, 2008
Messages
87
Thanks for you input. Seems i was a little off with one of the formulas. Ive managed to work it through now (based on suggestions). The cell A1 contains a string that represents a date in the (unrecogniseable) format 31/05/2008:11:00:05 and so the following formula does the trick :

=TEXT(DATEVALUE(MID(A1,1,10)),"mmmm")

Returns the month as a string (that I can now use in an indirect function to reference to other tabs)

Thanks again
 
Upvote 0

Forum statistics

Threads
1,191,177
Messages
5,985,138
Members
439,941
Latest member
robertv13

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top