Extracting a month name forom a date

F

Finance Guru

Hello All,
Using Excel 2007

Question - can some member supply me with the formula to do this

In A1 is the date 30/04/2009 ( UK format ) and in A3 I want to display the
month like this "APR" to 3 chars,based on A1. If the date in A1 had been
31/10/2009 then I want A3 to display "OCT" ... and so on

Thanks in advance of offers of help
 
M

Mike H

Hi,

Two methods

In another cell put the formula =A1 and formta that cell as mmm

or in another cell

=TEXT(A1,"mmm")

Note that if you add another m to the last formula you get the full month
name.

Mike
 
S

Sanjay

Hi,


Can do it using VBA, put the below code:

Range("A3").FormulaR1C1 = Format(Range("A1"), "mmm")


Good Luck,
Sanjay

--If post is helpfun then click Yes--
 
F

Finance Guru

Thanks Guys for the replies. Mike's did it for me,however I had already
sussed out the UPPER() bit of David's as that was what I wanted. Sanjay
thanks also.

Much appreciated
 
R

Rick Rothstein

Besides using the Format function, you can also do this...

Range("A4").Formula = MonthName(Month(Range("A1").Value), True)
 

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

Top