Formula to add a number count of months to a date column


I am trying to create a formula that adds a cell that has a number, and a cell that is a date. The number is the count of months to add to the date. I have the date column formatted as "Date" and the number columns as text/number. The destination column is formatted as a date.

This gets me close to it but not exact.

=[Repayment Start Date]216 + ([Repayment Terms (in months)]216 * 30)

Thank you!

Best Answers


  • Works perfectly, thank you! I just added -1 at the end of the formula to give me the last day of the previous month. Thanks again!

  • There were only about 5 line items that came up with this error.

  • That worked! Thank you! Are you up to helping with one more? Now we want to measure how many months are after Jan 2021 and that column is formatted as text/number.

    Ideally, the first example below would equal 0 and the 2nd example would equal 1.

    Thank you in advance!

  • Cleversheet
    Cleversheet ✭✭✭✭✭✭

    Here's a generic solution for counting the months from today (or other referenced date)...

    In column [Months from Today] this column-formula will show the number of months before/-after the value in [TestDate], where prior months are positive and future months are negative. If [TestDate] is in the current month the result is zero (0).

    =IF([TestDate]@row < TODAY(), (VALUE(MONTH(TODAY()))) + (13 - VALUE(MONTH([TestDate]@row))) + ((VALUE(YEAR(TODAY())) - VALUE(YEAR([TestDate]@row)) - 1) * 12) - 1, (VALUE(MONTH(TODAY()) - 12)) + (-VALUE(MONTH([TestDate]@row))) + ((VALUE(YEAR(TODAY())) + 1 - VALUE(YEAR([TestDate]@row))) * 12))

    To compare a given date against a particular date instead of against today, replace all instances of TODAY() with that date’s cell (or summary field) reference.

    Note that this does not take into account the number days, only month values. Thus from 4/30/21 to 5/1/21 yields 1 "month" even there's only one day between those dates.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!