How to display 5 into May in mmm format?

E

Eric

Does anyone know how to display 5 into May in mmm format for excel?
If I input the number 5 in cell A1, then I would like to see May in cell B1.
Does anyone have any suggestion?
Thank you for any suggestion
Eric
 
T

T. Valko

If you want this to be a TEXT value:

=IF(A1="","",TEXT(DATE(2006,1,A1*29),"mmm"))

Biff
 
R

Roger Govier

Hi Biff

Interestingly this also works with just
=(A1="","",TEXT(A1*29,"mmm"))
 
T

T. Valko

I had a "duh moment" after I had posted.

Instead of:

=IF(A1="","",TEXT(DATE(2006,1,A1*29),"mmm"))

It could be simply:

=IF(A1="","",TEXT(DATE(2006,A1,1),"mmm"))
Interestingly this also works with just
=(A1="","",TEXT(A1*29,"mmm"))

Yes, even better. Nice and compact!

If A1 = 1 for month January

1*29 = 29 = serial date for Jan 29 1900

Biff
 
Top