Posted to microsoft.public.excel.misc
|
|
extract the month of a date
Hi Bryan
Formatting a cell as mmm will display the Month name Jan, Feb etc. dependent
upon the serial date number held within that cell. It does not require the
use on the MONTH() function, which returns a numeric 1 to 12.
Alternatively rather than a long Lookup, you can use =Text(A1,"mmm") to
return Jan, Feb, etc.
Regards
Roger Govier
Bryan Hessey wrote:
Yes, it only worked for Jan.
Better is
=LOOKUP(MONTH(A1),{1,2,3,4,5,6,7,8,9,10,11,12},{"j an","feb","mar","apr","may","jun","jul","aug","sep ","oct","nov","dec"})
which accomodates the other eleven months also.
JMay Wrote:
I've entered all months of the year,
from 01/15/05,,,,,, to 12/15/05
in Cell A1 (one at a time of course)
Each time my cell B1 =month(A1)
yeilds 1,,,,,,,12 << Great (as expected).
But when I format B1 as Custom "mmm"
they come out Jan,,,,,,,,,Jan
What's my problem?
TIA,
"Bryan Hessey"
<Bryan.Hessey.1yy79a_1132746601.0002@excelforu m-nospam.com
wrote in message
news:Bryan.Hessey.1yy79a_1132746601.0002@excelfo rum-nospam.com...
Rightmouse and Format Cell to Custom format = mmm
then =Month(A1)
shoud give you your required answer.
gireesh Wrote:
I want to extract the month of a date. for example I have date
"6/5/2005" which is in "mm/dd/yyyy" format. i want to get the month
part of the date as "Jun". Similarly for the date "8/12/2005" as
"Aug".
Presently I am doing this with the help of VLOOKUP approach with a
table having these values.
As i am having a huge volume of data to work with a quicker and
easier
formula can be a great help.
Thank you.
--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile:
http://www.excelforum.com/member.php...o&userid=21059
View this thread:
http://www.excelforum.com/showthread...hreadid=487578
|