how to get monthname

  • Thread starter Thread starter pol
  • Start date Start date
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
 
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
 
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
 
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"
 
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"
 
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
 
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
 
The Poster's formula is quite interesting. It never occured to me to test
for "fake" dates by using the CELL() function.
 
The Poster's formula is quite interesting. It never occured to me to test
for "fake" dates by using the CELL() function.
 
=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
 
=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
 
Back
Top