Avatar of chris pike
chris pike
Flag for Canada asked on

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

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
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Flyster

8/22/2022 - Mon
Subodh Tiwari (Neeraj)

You may simple try this...

=DATEDIF(B4,D4,"m")

Open in new window

Rob Henson

This can be done with the DATEDIF function

=DATEDIF(Start, Finish, Option)

or in your sheet:
=DATEDIF(B4,D4,"m")
ASKER CERTIFIED SOLUTION
Rob Henson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
chris pike

ASKER
Rob I tried that but because I have formulas populating the source of the date cell I get errors
Your help has saved me hundreds of hours of internet surfing.
fblack61
Rob Henson

The source cells having formulas shouldn't cause any issue
Flyster

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
chris pike

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

Thanks Neeraj
Thanks
Flyster
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Flyster

Thanks Chris. Glad you found a solution!