Month before last month?

I use this for the previous month, what would I use for the month before last month?
AND(IFERROR(MONTH(@cell), 0) = MONTH(DATE(YEAR(TODAY()), MONTH(TODAY()), 1) - 1), IFERROR(YEAR(@cell), 0) = YEAR(DATE(YEAR(TODAY()), MONTH(TODAY()), 1) - 1)))
Thank you.
Answers
-
Hi @Mike Miles ,
=IFERROR(IF(MONTH(@cell)= 1, 11, IF(MONTH(@cell)=2,12, MONTH(@cell)-2)),"")
You'll need to doentify the range for @cell to work.
Help?
Mark
I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.
-
Thanks. I'm actually using SUMIFS to pull data from another sheet that has data by location and date. (multiple years). Here is the formula I'm using for the previous month, which works but I can't figure out how to pull data for the month before last.
=SUMIFS({Data}, {Data Location}, Item@row, {Data Date}, AND(IFERROR(MONTH(@cell), 0) = MONTH(DATE(YEAR(TODAY()), MONTH(TODAY()), 1) - 1), IFERROR(YEAR(@cell), 0) = YEAR(DATE(YEAR(TODAY()), MONTH(TODAY()), 1) - 1)))
Thanks
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.8K Get Help
- 474 Global Discussions
- 206 Use Cases
- 517 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 83 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!