Previous Month Forumla
I would like to populate a series of dates based on the current date. Excell has the function EOMONTH that would work perfect, but it doesn't seem to work in smartsheet. I tested the formula "=EOMONTH(B4,-2)+1" and this gives me what I want. Any thoughts on how to create this in smartsheet?
Answers
-
Are you looking for the previous month to today's month? If so, are you trying to generate a date that is the last day of that month or the first day of that month, or something entirely different?
-
I'm trying to generate the first day of the previous month. I've come up with this based on some responses here on this help site.
=IFERROR(DATE(YEAR($Date$2), MONTH($Date$2) - 1, 1), DATE(YEAR($Date$2) - 1, MONTH($Date$2) - 1 + 12, 1)).
Seems to be working out ok. I also wanted to display the same concept, but look 2 months in the past, and then 3 months in the past and so on. so I just change the "-1" in the formula to "-2", and "-3" and so on. I've tested it and seems ok. I'd welcome any advice on it though.
-
That's pretty much it. Well done.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.1K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 450 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 289 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!