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
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!