How to add varying months to varying dates?
I am really having trouble getting a formula to work here. I've gone through a number of support articles, but I'm just missing something.
I want a formula that looks at Date Contract Executed and it adds Months Until Expiration to produce a new Date of Expiration. I've got my date columns as dates and the middle column as a number.
Any help is appreciated!
Best Answer
-
This should work:
=DATE(YEAR([Date Contract Executed]@row) + ROUNDDOWN(([Months Until Expiration]@row + MONTH([Date Contract Executed]@row)) / 12.00001, 0), MOD([Months Until Expiration]@row, 12) + MONTH([Date Contract Executed]@row), DAY([Date Contract Executed]@row))
Answers
-
This should work:
=DATE(YEAR([Date Contract Executed]@row) + ROUNDDOWN(([Months Until Expiration]@row + MONTH([Date Contract Executed]@row)) / 12.00001, 0), MOD([Months Until Expiration]@row, 12) + MONTH([Date Contract Executed]@row), DAY([Date Contract Executed]@row))
-
I hadn't seen "Rounddown" before — thank you!!
-
This should get the job done for you:
=IFERROR(IFERROR(DATE(YEAR([Date Contract Executed]@row) + ROUNDDOWN((MONTH([Date Contract Executed]@row) + [Months Until Expiration]@row) / 12, 0) + IF(IF(MOD(MONTH([Date Contract Executed]@row) + [Months Until Expiration]@row, 12) = 0, 12, MOD(MONTH([Date Contract Executed]@row) + [Months Until Expiration]@row, 12)) = 12, -1) - IF(AND(ABS([Months Until Expiration]@row) - MONTH([Date Contract Executed]@row) <> 12, [Months Until Expiration]@row < 0, ABS([Months Until Expiration]@row) > MONTH([Date Contract Executed]@row)), 1, 0), IF(MOD(MONTH([Date Contract Executed]@row) + [Months Until Expiration]@row, 12) = 0, 12, MOD(MONTH([Date Contract Executed]@row) + [Months Until Expiration]@row, 12)), DAY([Date Contract Executed]@row)), DATE(IF(MONTH([Date Contract Executed]@row) - ABS([Months Until Expiration]@row) < 1, YEAR([Date Contract Executed]@row) - 1, YEAR([Date Contract Executed]@row)), IF(MONTH([Date Contract Executed]@row) - ABS([Months Until Expiration]@row) < 1, MONTH([Date Contract Executed]@row) + (12 - ABS([Months Until Expiration]@row)), MONTH([Date Contract Executed]@row) - ABS([Months Until Expiration]@row)), DAY([Date Contract Executed]@row))), "")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!