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
- 63.4K Get Help
- 394 Global Discussions
- 213 Industry Talk
- 449 Announcements
- 4.6K Ideas & Feature Requests
- 141 Brandfolder
- 132 Just for fun
- 131 Community Job Board
- 453 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 293 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!