# 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)), "")

• ✭✭✭✭✭✭

=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)), "")

• ✭✭✭✭✭✭

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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!