ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to get monthname (https://www.excelbanter.com/excel-discussion-misc-queries/232056-how-get-monthname.html)

pol

how to get monthname
 
Hi all,

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

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

with thanks and regards

Pol

Jacob Skaria

how to get monthname
 
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
---------------
Jacob Skaria


"pol" wrote:

Hi all,

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

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

with thanks and regards

Pol


Gary''s Student

how to get monthname
 
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","no v","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"
--
Gary''s Student - gsnu200855


"pol" wrote:

Hi all,

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

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

with thanks and regards

Pol


Jacob Skaria

how to get monthname
 
With your formula..

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

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"pol" wrote:

Hi all,

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

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

with thanks and regards

Pol


Gary''s Student

how to get monthname
 
The Poster's formula is quite interesting. It never occured to me to test
for "fake" dates by using the CELL() function.
--
Gary''s Student - gsnu200855


"Jacob Skaria" wrote:

With your formula..

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

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"pol" wrote:

Hi all,

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

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

with thanks and regards

Pol


Dana DeLouis[_3_]

how to get monthname
 

=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


Gary''s Student wrote:
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","no v","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"



All times are GMT +1. The time now is 08:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com