Previous Month formula
Hi
I'm in the process of creating MTD and Previous MTD helper columns. If the Create Date is current month, I want to check a box. I have this formula working perfectly. What I'm struggling with is previous MTD. If the Create Date is the previous month, then check a box. If the Create Date is older than previous month, don't check the box or uncheck the box if it was already check. Below is my formula for the MTD
=IF(AND(YEAR(Created@row) = YEAR(TODAY()), MONTH(Created@row) = MONTH(TODAY())), 1)
I'm sure it is an easy formula but I can't figure it out.
Best Answer
-
If you're just wanting the month to compare to last (e.g. July today vs. June last), then this will do what you're after:
=IF(AND(YEAR(Created@row) = YEAR(TODAY()), MONTH(Created@row) = (MONTH(TODAY())) - 1), 1)
Hope this helps! 😊
Answers
-
If you're just wanting the month to compare to last (e.g. July today vs. June last), then this will do what you're after:
=IF(AND(YEAR(Created@row) = YEAR(TODAY()), MONTH(Created@row) = (MONTH(TODAY())) - 1), 1)
Hope this helps! 😊
-
@Nick Korna - that did it. I have the 1 in the wrong place. I had it in the TODAY(-1). Thank you for your help and I hope you have a great day!
-
You're more than welcome; happy to have helped!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.7K Get Help
- 406 Global Discussions
- 218 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!