We help IT Professionals succeed at work.

Calculate number of months in Excel

220 Views
Last Modified: 2017-04-11
How do I represent today less the value of cell in terms of number of months?

The below example shows my attempt
https://www.screencast.com/t/XoVirpBqlnn
Comment
Watch Question

ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Jeff DarlingDeveloper Analyst
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Ted PennerData Structures Engineer
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Ted PennerData Structures Engineer

Author

Commented:
Jeff,

Your solution appears more solid but I still get an error in the top cell.

https://www.screencast.com/t/7Z3RufemZb
Jeff DarlingDeveloper Analyst
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Ted PennerData Structures Engineer

Author

Commented:
Number should always be positive and if not a positive number of months, then the value should be zero.
Jeff DarlingDeveloper Analyst
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Managing Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Ted PennerData Structures Engineer

Author

Commented:
I think the values should be 9 and 21 if not past the expiration date as shown here.

https://docs.google.com/spreadsheets/d/1cjS8qfytLJwIwbId5xfNmHm5NxsX_9gwWYxbO_B55AA/edit?usp=sharing
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
With my last provided solution, you are getting 9 & 21
Month Calculation
Ted PennerData Structures Engineer

Author

Commented:
Thank you!!
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Please to help!