Convert Month Number to Text

Smurfit-Stone

Active Member
Joined
Dec 1, 2004
Messages
485
Hello, I have a query and report that prompts the user to enter a month (e.g. 1,2,3 etc) I'd like to add the month in the header of the report created using this query. Currently is shows the month number, but I'd like to change it to text (e.g. 1-January, 2-February, 3-March etc.) would I do this in the query itself or in the properties of the textbox I've placed the formula in on the report......I thought I'd fix it by creating a table with the months listed with a autonumber, but now I dont' know how to add the table to the query expression or to the report textbox.....HELP
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
63,302
Office Version
  1. 365
Platform
  1. Windows
Say your month number field is named MonthNum, then in a query, create this calculated field:

MonthName:[MonthNum] & "-" & Format(DateSerial(2005,[MonthNum],1),"mmmm")

This will return what you are looking for.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,018
Messages
5,834,976
Members
430,331
Latest member
Syed Yasir Hannan

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