Last month's date

N

Nick Xylas

I have to create a monthly report in Excel, for which I have a
template, but I wondered if there was a way that I can automatically
put last month's date into a cell. I can put TODAY and format it into
the "Feb-06" format for this month, but the report is for the previous
month. Is there a way to fix it so that if I am doing the report in
February, the cell automatically returns the value "Jan-06"?
 
J

JE McGimpsey

One way:

=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),0),"mmm-yy")

Note that it returns Jan-07, not Jan-06.
 
D

daddylonglegs

=TODAY()-DAY(TODAY())

format as mmm yy

JE McGimpsey said:
One way:

=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),0),"mmm-yy")

Note that it returns Jan-07, not Jan-06.
 
N

Nick Xylas

One way:

=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),0),"mmm-yy")

Note that it returns Jan-07, not Jan-06.
Yeah, I meant 07, my brain is still stuck in last year :)
 
Top