how to get monthname

P

pol

Hi all,

please let me know From the following formula how to derive monthname

=MONTH(IF(LEFT(CELL("format",A3),1)="D",A3,DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2))))

with thanks and regards

Pol
 
J

Jacob Skaria

If A3 is in date format the below formula will return the month name..Does
that help..If not post back

=TEXT(A3,"mmm")

If this post helps click Yes
 
J

Jacob Skaria

If A3 is in date format the below formula will return the month name..Does
that help..If not post back

=TEXT(A3,"mmm")

If this post helps click Yes
 
G

Gary''s Student

If you must use your formula, then:

=CHOOSE(MONTH(IF(LEFT(CELL("format",A3),1)="D",A3,DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2)))),"jan","feb","mar","apr","may","jul","aug","sep","oct","nov","dec")


but easier is:

=IF(LEFT(CELL("format",A3),1)="D",A3,DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2)))

and format the cell with the formula as Custom "mmmm"
 
G

Gary''s Student

If you must use your formula, then:

=CHOOSE(MONTH(IF(LEFT(CELL("format",A3),1)="D",A3,DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2)))),"jan","feb","mar","apr","may","jul","aug","sep","oct","nov","dec")


but easier is:

=IF(LEFT(CELL("format",A3),1)="D",A3,DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2)))

and format the cell with the formula as Custom "mmmm"
 
J

Jacob Skaria

With your formula..

=TEXT(IF(LEFT(CELL("format",A3),1)="D",A3,DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2))),"mmm")

If this post helps click Yes
 
J

Jacob Skaria

With your formula..

=TEXT(IF(LEFT(CELL("format",A3),1)="D",A3,DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2))),"mmm")

If this post helps click Yes
 
G

Gary''s Student

The Poster's formula is quite interesting. It never occured to me to test
for "fake" dates by using the CELL() function.
 
G

Gary''s Student

The Poster's formula is quite interesting. It never occured to me to test
for "fake" dates by using the CELL() function.
 
D

Dana DeLouis

=IF(LEFT(CELL("format",A3),1)="D",A3,DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2)))

Just a thought might be to ignore the Year and Day.

=IF(LEFT(CELL("format",A3),1)="D",A3,DATE(2000,MID(A3,5,2),1))

= = =
Dana DeLouis
 
D

Dana DeLouis

=IF(LEFT(CELL("format",A3),1)="D",A3,DATE(LEFT(A3,4),MID(A3,5,2),RIGHT(A3,2)))

Just a thought might be to ignore the Year and Day.

=IF(LEFT(CELL("format",A3),1)="D",A3,DATE(2000,MID(A3,5,2),1))

= = =
Dana DeLouis
 

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