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

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    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)))

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!