Hi,
I'm after a formula that will return true if a date is within the previous calendar month. I can test by comparing month(today()) and month(today())-1, but the problem comes when the new year ticks over. How can I handle the change of year?
Hi,
I'm after a formula that will return true if a date is within the previous calendar month. I can test by comparing month(today()) and month(today())-1, but the problem comes when the new year ticks over. How can I handle the change of year?
With the date you are querying in A1, try this:
=AND(A1<=EOMONTH(B1,-1),A1>EOMONTH(B1,-2))
or this:
=AND(A1<=EOMONTH(TODAY(),-1),A1>EOMONTH(TODAY(),-2))
Last edited by AliGW; 12-02-2017 at 09:56 AM.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
This would do it
=EOMONTH(A1,0)=EOMONTH(TODAY(),-1)
Audere est facere
Yes, it would - good one!![]()
Cool. Thanks guys. I'll give it a try on Monday, it looks like that will do the trick.
Last edited by AliGW; 12-02-2017 at 10:20 AM. Reason: Unnecessary quotation removed.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks