ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Workaround for returning month name? (https://www.excelbanter.com/excel-worksheet-functions/13098-workaround-returning-month-name.html)

Marty

Workaround for returning month name?
 
Hi all:

I'd like to return the month (Jan, Feb, Mar, etc.) from cells containing
dates.

Some variation of (formulas in column B):

=IF(MONTH(A1)=1,"Jan",IF(MONTH(A1)=2,"Feb",...

would be nice, but you can see the problem this gives, i.e. Excel allows a
maximum of seven nested Ifs.

I want to do this with a formula instead of VBA. Anyone have a suggested
woraround for this?

Thanks in advance.

MARTY

Peo Sjoblom

=TEXT(A1,"mmmm")

or just link

=A1 and use a custom format of mmmm

--

Regards,

Peo Sjoblom


"Marty" wrote in message
...
Hi all:

I'd like to return the month (Jan, Feb, Mar, etc.) from cells containing
dates.

Some variation of (formulas in column B):

=IF(MONTH(A1)=1,"Jan",IF(MONTH(A1)=2,"Feb",...

would be nice, but you can see the problem this gives, i.e. Excel allows a
maximum of seven nested Ifs.

I want to do this with a formula instead of VBA. Anyone have a suggested
woraround for this?

Thanks in advance.

MARTY




Trevor Shuttleworth

Marty

if the date is in cell A2, just put =A2 in another cell and give it a custom
format of "mmm" for Jan, Feb, Mar, etc and "mmmm" for January, February and
so on

Regards

Trevor


"Marty" wrote in message
...
Hi all:

I'd like to return the month (Jan, Feb, Mar, etc.) from cells containing
dates.

Some variation of (formulas in column B):

=IF(MONTH(A1)=1,"Jan",IF(MONTH(A1)=2,"Feb",...

would be nice, but you can see the problem this gives, i.e. Excel allows a
maximum of seven nested Ifs.

I want to do this with a formula instead of VBA. Anyone have a suggested
woraround for this?

Thanks in advance.

MARTY




Bob Phillips

It might just be mmm for a short name.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Peo Sjoblom" wrote in message
...
=TEXT(A1,"mmmm")

or just link

=A1 and use a custom format of mmmm

--

Regards,

Peo Sjoblom


"Marty" wrote in message
...
Hi all:

I'd like to return the month (Jan, Feb, Mar, etc.) from cells containing
dates.

Some variation of (formulas in column B):

=IF(MONTH(A1)=1,"Jan",IF(MONTH(A1)=2,"Feb",...

would be nice, but you can see the problem this gives, i.e. Excel allows

a
maximum of seven nested Ifs.

I want to do this with a formula instead of VBA. Anyone have a

suggested
woraround for this?

Thanks in advance.

MARTY






Marty

Peo/Trevor:

Excellent service as usual. Thanks very much.

MARTY

"Trevor Shuttleworth" wrote:

Marty

if the date is in cell A2, just put =A2 in another cell and give it a custom
format of "mmm" for Jan, Feb, Mar, etc and "mmmm" for January, February and
so on

Regards

Trevor


"Marty" wrote in message
...
Hi all:

I'd like to return the month (Jan, Feb, Mar, etc.) from cells containing
dates.

Some variation of (formulas in column B):

=IF(MONTH(A1)=1,"Jan",IF(MONTH(A1)=2,"Feb",...

would be nice, but you can see the problem this gives, i.e. Excel allows a
maximum of seven nested Ifs.

I want to do this with a formula instead of VBA. Anyone have a suggested
woraround for this?

Thanks in advance.

MARTY






All times are GMT +1. The time now is 04:49 PM.

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