I have a formula that does not work now because of the new year.
This formula has been working just fine until the month of December and now returns #invalid Data Type" I assume it is because it is looking for dates within this calendar year and not next calendar year? Does anyone have any suggestions on how I can fix this problem?
The formula looks at the Determination Date and then adds 1 month to that date and enters it into the cell this formula is in. Or the "Conditional License" Which is 1 month after the determination date and lasts for 6 months.
=IF([CONDITIONAL LICENCE]@row, DATE(YEAR([Determination Date]@row), MONTH([Determination Date]@row) + 1, DAY([Determination Date]@row)), "")
Best Answer
-
=IF([CONDITIONAL LICENCE]@row, DATE(if(MONTH([Determination Date]@row)=12,YEAR([Determination Date]@row)+1,YEAR([Determination Date]@row)), MONTH([Determination Date]@row) + 1, DAY([Determination Date]@row)), "")
Answers
-
The problem is that month 12 plus 1 is month 13 which does not work. Try this:
=IF([CONDITIONAL LICENCE]@row, IFERROR(DATE(YEAR([Determination Date]@row), MONTH([Determination Date]@row) + 1, DAY([Determination Date]@row)), DATE(YEAR([Determination Date]@row) + 1, 1, DAY([Determination Date]@row))), "")
-
=IF([CONDITIONAL LICENCE]@row, DATE(if(MONTH([Determination Date]@row)=12,YEAR([Determination Date]@row)+1,YEAR([Determination Date]@row)), MONTH([Determination Date]@row) + 1, DAY([Determination Date]@row)), "")
-
@Leibel S I'm not sure that would work because of the MONTH() + 1 portion.
-
@Paul Newcome Yup i went a little too fast there...
=IF([CONDITIONAL LICENCE]@row, DATE(if(MONTH([Determination Date]@row)=12,YEAR([Determination Date]@row)+1,YEAR([Determination Date]@row)), if(MONTH([Determination Date]@row)=12,1,MONTH([Determination Date]@row) + 1), DAY([Determination Date]@row)), "")
-
@Paul Newcome @Leibel S =IF([CONDITIONAL LICENCE]@row, IFERROR(DATE(YEAR([Determination Date]@row), MONTH([Determination Date]@row) + 1, DAY([Determination Date]@row)), DATE(YEAR([Determination Date]@row) + 1, 1, DAY([Determination Date]@row))), "") This one worked Thank you Both.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.3K Get Help
- 364 Global Discussions
- 199 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 444 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!