Excel formula to count how many months from today (cell has formula already)

chris pike
chris pike used Ask the Experts™
on
Hi Experts,
I have another excel request.
I need help with a formula that tells me the difference in months.
I can do this with static dates just fine,. But my date cell has a formula already and I get an error.
See attached dummy sheet as well.
Thanks
Chris
Example      How many months from today - Excel formuladummy-sheet-difference-in-months.xlsx
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Subodh Tiwari (Neeraj)Excel & VBA Expert
Most Valuable Expert 2018
Awarded 2015

Commented:
You may simple try this...

=DATEDIF(B4,D4,"m")

Open in new window

Rob HensonFinance Analyst

Commented:
This can be done with the DATEDIF function

=DATEDIF(Start, Finish, Option)

or in your sheet:
=DATEDIF(B4,D4,"m")
Finance Analyst
Commented:
DATEDIF gives only whole months between the two dates, ie in your example it will change to 7 on 6 December.

There is also the YEARFRAC function that can give more accuracy
Success in ‘20 With a Profitable Pricing Strategy

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

Author

Commented:
Rob I tried that but because I have formulas populating the source of the date cell I get errors
Rob HensonFinance Analyst

Commented:
The source cells having formulas shouldn't cause any issue
If you want to disregard the days and just look for the difference in the months, you can try this:

=MONTH(D4)-MONTH(B4)

Paul

Author

Commented:
Thanks for the extra help with the YEARFRAC function solution Rob.
This is what I was looking for,

Thanks Neeraj
Thanks
Flyster
Thanks Chris. Glad you found a solution!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial