Converting month number to text equivalent

  • Thread starter Thread starter AlanN
  • Start date Start date
A

AlanN

In cell A1 I have the date 01/06/2004 (Jan 6th, 2004) displayed. I want to list the Month and Year of the previous month in cell B1. In this example I need "DEC-2003" to display. Can anyone help?

TIA, Alan
 
=date(year(a1),month(a1)-1,1)

and format as mmm-yyyy
this will actually show as Dec-2003

If you really have to have DEC-2003:
=UPPER(TEXT(DATE(YEAR(A1),MONTH(A1)-1,1),"mmm-yyyy"))
 
just format it as such
mmm-yyyy

--
Don Guillett
SalesAid Software
(e-mail address removed)
In cell A1 I have the date 01/06/2004 (Jan 6th, 2004) displayed. I want to list the Month and Year of the previous month in cell B1. In this example I need "DEC-2003" to display. Can anyone help?

TIA, Alan
 
Works like a charm-many thanks!

Alan

Dave Peterson said:
=date(year(a1),month(a1)-1,1)

and format as mmm-yyyy
this will actually show as Dec-2003

If you really have to have DEC-2003:
=UPPER(TEXT(DATE(YEAR(A1),MONTH(A1)-1,1),"mmm-yyyy"))
 
Back
Top