Formula Stopped Working

I've been using the below formula to calculate how many months have passed between dates (a single day in a month should have that month counted). It's been working perfectly for months, but recently I switched one of the columns from automatic population to manual (otherwise, no changes). It's now returning odd values, for example, my Date Opened and Date Closed both fell in March, and it returned a value of 3. Opened in March closed the previous January gives a value of 12, but closed in February gives 2 months. I have no idea what happened, and nothing I'm trying is fixing it. Any ideas?
=MONTH(([Date Closed]@row) - MONTH([Date Opened]@row) + ((YEAR([Date Closed]@row) - YEAR([Date Opened]@row)) * 12) + 1)
Best Answer
-
It looks like I may have messed up the parenthesis this time. Ugh. Need... Coffee... Haha
=MONTH([Date Closed]@row) - MONTH([Date Opened]@row) + ((YEAR([Date Closed]@row) - YEAR([Date Opened]@row)) * 12) + 1
Answers
-
It looks like you may have some parenthesis tucked in that aren't needed. Lets try cleaning those up first to see if that helps...
=MONTH([Date Closed]@row) - MONTH([Date Opened]@row) + ((YEAR([Date Closed]@row) - YEAR([Date Opened]@row) * 12) + 1
-
Thanks Paul! I replaced the earlier formula and the result update from 3 to -22241. Screenshots, if those help - I have no idea what's gone wrong.
-
It looks like I may have messed up the parenthesis this time. Ugh. Need... Coffee... Haha
=MONTH([Date Closed]@row) - MONTH([Date Opened]@row) + ((YEAR([Date Closed]@row) - YEAR([Date Opened]@row)) * 12) + 1
-
Fixed, thank you so much!!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.2K Get Help
- 430 Global Discussions
- 150 Industry Talk
- 490 Announcements
- 5.2K Ideas & Feature Requests
- 85 Brandfolder
- 154 Just for fun
- 74 Community Job Board
- 500 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!