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
- Customer Resources
- 65.3K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 302 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!