Change month format

kevbez1969

New Member
Joined
May 20, 2011
Messages
7
I have a cell say A1 containing a month in the short format (apr)

what vba scripting can i use to make cell A2 equal the same month but in the long format (April)

or even add it to some text in another cell as in the example below:

A1 = apr

so with the script run:

B1 = April
C1 = The month is April

Thanks
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Welcome to the board..

You can skip the intermediate cell B1...

In C1, put
="The month is "&TEXT((A1&YEAR(TODAY()))+0,"mmmm")

or if you want

B1: =TEXT((A1&YEAR(TODAY()))+0,"mmmm")
C1 ="The month is " & B1

Hope that helps.
 
Upvote 0
If A1 contains a date formatted to show just the short month, try

Code:
Sub atest()
With Range("A1")
    .Offset(, 1).Value = Format(.Value, "mmmm")
    .Offset(, 2).Value = "The month is " & Format(.Value, "mmmm")
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,682
Members
452,937
Latest member
Bhg1984

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
Back
Top