formula for previous month

D

drose

I have a form that I fill out each month for the previous month. Is there a
way or formula to automatically have the previous month post?
 
J

John C

By post... you mean what exactly?
To get the 1st day of the previous month, you could just use the following
formula:
=DATE(YEAR(TODAY()),MONTH(TODAY())-1,1)
 
P

Pete_UK

Try this:

=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()-1),DAY(TODAY())),"mmmm")

This will change (potentially) every day.

Hope this helps.

Pete
 
J

John C

I think you got a parenthetical in the wrong place.
=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()-1),DAY(TODAY())),"mmmm")
should be
=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY())),"mmmm")
 
P

Pete_UK

Thanks for pointing that out, John.

Pete

I think you got a parenthetical in the wrong place.
=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()-1),DAY(TODAY())),"mmmm")
should be
=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY())),"mmmm")
--
John C






- Show quoted text -
 
D

Dave Peterson

=today()-day(today())
will give the last day of the previous month.

Then you can format this cell to just show the month (or month and year):
mmmm yyyy
 
Top