Calculate number of months in Excel

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
frugalmuleAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ShumsDistinguished Expert - 2017Commented:
You can try below:
=MONTH(TODAY())-MONTH(F19)

Open in new window

0
Jeff DarlingDeveloper AnalystCommented:
=DATEDIF(NOW(),F19,"M")

Open in new window

0
frugalmuleAuthor Commented:
Thank you both.

With =MONTH(TODAY())-MONTH(F19), I would end up with 3 months which is not accurate.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

frugalmuleAuthor Commented:
Jeff,

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

https://www.screencast.com/t/7Z3RufemZb
0
Jeff DarlingDeveloper AnalystCommented:
It seems that DATEDIF doesn't like to return a negative.  so first test if greater and multiply by -1

=IF(F19>NOW(),DATEDIF(NOW(),F19,"M")*-1,DATEDIF(NOW(),F19,"M"))

Open in new window

0
ShumsDistinguished Expert - 2017Commented:
Jeff is right, your specified date are more than today's date, try below:
=IF(DAY(NOW())>=DAY(F19),0,)+(YEAR(NOW())-YEAR(F19)) *12+MONTH(NOW())-MONTH(F19)

Open in new window

0
frugalmuleAuthor Commented:
Number should always be positive and if not a positive number of months, then the value should be zero.
0
Jeff DarlingDeveloper AnalystCommented:
=IF(F19>NOW(),0,DATEDIF(NOW(),F19,"M"))

Open in new window

0
ShumsDistinguished Expert - 2017Commented:
If its gonna be future dates in F column then try below:
=IF(DAY(NOW())>=DAY(F19),0,0)+(YEAR(F19)-YEAR(NOW())) *12+MONTH(F19)-MONTH(NOW())

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
frugalmuleAuthor 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
0
ShumsDistinguished Expert - 2017Commented:
With my last provided solution, you are getting 9 & 21
Month Calculation
1
frugalmuleAuthor Commented:
Thank you!!
0
ShumsDistinguished Expert - 2017Commented:
Please to help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.