function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jmckjmck 

Help with Rolling Anniversary Date formula using months as interval

I have a need to calculate a rolling anniversary date using a number field called Renewal_Term.

Example Scenario:

Contract Date 1/12/2010 (Date field)
Inital Term (in Months): 12 (Number field)
Anniversary Date: 1/12/2011 (Date field)
Renwal Term (in Months): 12 (Number field)
Next Anniversary Date: 1/12/2013  (Formula field below)

Current Formula:
IF(TODAY() > Anniversary_Date__c, 
(DATE( 
YEAR ( Anniversary_Date__c ) + (FLOOR((TODAY() - Anniversary_Date__c) / 365.2425) + (Renewal_Term__c / 12)), 
MONTH(Anniversary_Date__c), 
DAY(Anniversary_Date__c))), 
(DATE( 
YEAR ( Anniversary_Date__c ) + (Renewal_Term__c / 12), 
MONTH(Anniversary_Date__c), 
DAY(Anniversary_Date__c))))

This formula works perfectly for any term that is greater than 12 months, but obviously does not for any term less than 12 months.  I would like to use the same concept, but be able to use any number of months to do the same thing.

Any suggestions?