Have a formula...need an alternative.

andyb16

Board Regular
Joined
Apr 19, 2011
Messages
77
Hi All,

Background: I have a column with certain dates populated.

Objective: I need the difference between today and the date in the column represented not in days but number of months it eqates to.

My solution: ("Date Difference*12)/365

My query: Is there any alternative function in excel that converts numbers directly into months. OR is there a better formula than the one above that would also factor in say leap years?

Thanks!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
If the date is before today try

=DATEDIF(A1,TODAY(),"m")

If it is after today reverse A1 and TODAY() in the formula.
 
Upvote 0
Why exactly are you unhappy with the solution you have now ?
It looks reasonably OK to me, given that calculating months is only ever going to be an approximation I think.
 
Upvote 0
Thanks All,

gbrandreth: Dunno how to work with YEARFRAC to give me a month fraction.

VoG: Your solutions works...thx!

Gerald: you r right..I am not unhappy with my solution...just trying to increase my knowledge of functions as I foresee that I may need to work with complex date data in the near future. Therefore looking to see if I can write shorter functions.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top