rounding the DATEDIF function

S

speary

Is there a way I can round the DATEDIF function so that partial months
are counted as a whole month.

For example here is what i want my spreadsheet to say;

start date end date total months
6/25/05 7/31/05 2


right now my function makes total months equal to 1. Thanks for any
suggestions.
 
G

Guest

This seems to work for your example, if you format the cell as general.

=MONTH(B1)-MONTH(A1)+1
 
G

Guest

forgot to add:
=ABS(MONTH(B1)-MONTH(A1))+1
For your example, this will compensate, if the dates are flipped.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DATEDIF function 5
datedif 1
Excel DateDif - why does 2007 seem different? 3
help with datedif function please 4
DATEDIF formula enhancement 10
Prorating calculations in Excel 0
DATEDIF vs. simple difference 5
Date Calculations 4

Top