Last Month

PCRIDE

Well-known Member
Joined
Jan 20, 2008
Messages
902
Any good way to get Last Month as a month number using today's date? Previously I've done =NOW()-32 and that seems to work, but without figuring it out you could run into a day in a month where this fails? Like the first day of the month would take you back 2 months until you hit the 2nd or 3rd day of the new month.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Just this should do it too, shouldn't it?

=MONTH(TODAY())-1
 
Upvote 0
Disadvantage is that there are two calls to the TODAY function but, with that said...

=MONTH(TODAY()-DAY(TODAY()))
 
Last edited:
Upvote 0
What if the current month is January?
:oops: I rushed in there Eric didn't I? (I often do with date questions :))

So an alternative, but no better than yours, might be?
=MONTH(EDATE(TODAY(),-1))
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,387
Members
448,956
Latest member
JPav

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top