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
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!