Nov 19 2020 04:43 AM
Hello Excel Community,
I am having trouble with this Datedif-formula.
I want Excel to count the difference in months between two dates.
This does work, but not in every case like I want it to.
Concretely, I have the following issue:
The difference in Months between 17/09/2018 and 21/09/2020.
Obviously, 24 Months lie between these two given dates.
Although, the 25th Month has already started with 4 days.
Therefore I would like Excel to do the following:
The difference between two dates, expressed in Months, but taking into account the Month that has already started, but hasn't been fully passed.
In the beforementioned example; the outcome is 24 Months and 4 days.
Therefore, I want the outcome to be: 25 Months (instead of 24, as it does so now) .
How can I compute this in a formula?
Thank you for your help!
Nov 19 2020 05:11 AM
ROUNDUP?
=ROUNDUP(DATEDIF(A1,B1,""m""),0)
or
=DATEDIF(A1,B1,""m"")+1
depending on how you want to handle "exactly 24 months"
Nov 19 2020 05:26 AM
SolutionNov 19 2020 06:09 AM
Much better. I honestly don't know what i meant with the ROUNDUP thing.
This should also work (except for day Zero)
=DATEDIF(A1,B1-1,"M")+1
Nov 19 2020 05:26 AM
Solution