Error adding month when going into next year
=IFERROR(Recurs@row = "Monthly", (DATE(YEAR(Due@row), MONTH(Due@row) + 1, DAY(Due@row))),IFERROR(Recurs@row="Annually",(DATE(YEAR(Due@row)+1, MONTH(Due@row), DAY(Due@row)))))
Works like a charm until a date in December would happen in January, then it throws an error.
Best Answer
-
Try this instead...
=IF(Recurs@row = "Monthly", IFERROR(DATE(YEAR(Due@row), MONTH(Due@row) + 1, DAY(Due@row)), DATE(YEAR(Due@row) + 1, 1, DAY(Due@row))), DATE(YEAR(Due@row) + 1, MONTH(Due@row), DAY(Due@row)))
Answers
-
Try this instead...
=IF(Recurs@row = "Monthly", IFERROR(DATE(YEAR(Due@row), MONTH(Due@row) + 1, DAY(Due@row)), DATE(YEAR(Due@row) + 1, 1, DAY(Due@row))), DATE(YEAR(Due@row) + 1, MONTH(Due@row), DAY(Due@row)))
-
Thanks @Paul Newcome that's what I wasn't getting was that IFERROR syntax which I'm trying to make sound like it's something I knew about before today but I didn't and that's fantastic and thanks!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!