Subtract 2 Months from "6 Month Renewal Reminder" Date Column

Hello,

What formula reliably returns a date 2 months before the date in the "6 Month Renewal Reminder" date column? This is the last formula I tried, which I found in another article here in the Smartsheet Community.

=IF(MONTH([Date Column]@row) - [Number of months before]@row <= 0, DATE(YEAR([Date Column]@row) - 1, 12 + (MONTH([Date Column]@row) - [Number of months before]@row), DAY([Date Column]@row)), DATE(YEAR([Date Column]@row), MONTH([Date Column]@row) - [Number of months before]@row, DAY([Date Column]@row)))

Subtracting Days & Months from Specific Dates Using a Separate Day/Date Column. — Smartsheet Community

I would also like to know if I could use the same formula for adding months to the date in a column by changing the minus sign to a plus sign. The formula needs to be useful for dates within the same year and dates going into another year.

Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    This will work for any number of months entered in a different column both positive and negative.

    =IFERROR(IFERROR(DATE(YEAR([Original Date]@row) + ROUNDDOWN((MONTH([Original Date]@row) + [Number of Months]@row) / 12, 0) + IF(IF(MOD(MONTH([Original Date]@row) + [Number of Months]@row, 12) = 0, 12, MOD(MONTH([Original Date]@row) + [Number of Months]@row, 12)) = 12, -1) - IF(AND(ABS([Number of Months]@row) - MONTH([Original Date]@row) <> 12, [Number of Months]@row < 0, ABS([Number of Months]@row) > MONTH([Original Date]@row)), 1, 0), IF(MOD(MONTH([Original Date]@row) + [Number of Months]@row, 12) = 0, 12, MOD(MONTH([Original Date]@row) + [Number of Months]@row, 12)), DAY([Original Date]@row)), DATE(IF(MONTH([Original Date]@row) - ABS([Number of Months]@row) < 1, YEAR([Original Date]@row) - 1, YEAR([Original Date]@row)), IF(MONTH([Original Date]@row) - ABS([Number of Months]@row) < 1, MONTH([Original Date]@row) + (12 - ABS([Number of Months]@row)), MONTH([Original Date]@row) - ABS([Number of Months]@row)), DAY([Original Date]@row))), "")

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!