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.
 
T

tjtjjtjt

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

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

tjtjjtjt

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