Typically I would use datedif( for my date range formulas but I I find it rounds whole months. I'm looking for a formula that would give me these results.
10/01/23 - 12/15/23
Datedif( RESULTS: 3 months
LOOKING FOR RESULTS: 2.5 months
You can subtract one date from the other and divide by 30 to if you want approximate fractional months.
Or divide by (365/12) if you want a more exact value.
The formula worked with within a single year. What if I have dates spanning multiple years? Is there something similar to 'datedif(' where it counts the number of days and the output is placed in a month format?
The formula worked with within a single year. What if I have dates spanning multiple years? Is there something similar to 'datedif(' where it counts the number of days and the output is placed in a month format?
Instead of dividing the difference in days by 30, divide by (365.25/12), which is a little over 30 and should get you very close.
The logic is that there are 365 in most years, except every fourth year it has 366 (except for once a century).
So 365.25 days is a good estimate of the number of days in any year.
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.