# Calculate number of days including both days

1. ## Calculate number of days including both days

Hi,

I am trying to calculate number of days in a date range.

For eg: 1 September and 3 September. I am looking for 3 days. however when i apply datedif i just get difference between both the dates which is 2.

Anybody can help to get 3 as output? since there is 1 sep, 2 sep and 3 sep in the range.  Register To Reply

2. ## Re: Calculate number of days including both days

Add 1 to the DATEDIF function =DATEDIF(Start,end,"d")+1  Register To Reply

3. ## Re: Calculate number of days including both days

Yes:

=DATEDIF(A1,B1,"d")+1  Register To Reply

4. ## Re: Calculate number of days including both days

Thanks, But with this alternative, i get 1 in the blank cells , where there is no date entered ( if i extend the formulae in a bigger range)

Is there any direct solution or formula for this??  Register To Reply

5. ## Re: Calculate number of days including both days

As you have not defined which empty cell (start or end date) should be checked, the general formula is =IF(emptycell_ref="","",DATEDIF(Start,end,"d")+1 )  Register To Reply

6. ## Re: Calculate number of days including both days

serves the purpose, thanks a ton  Register To Reply

7. ## Re: Calculate number of days including both days

You're welcome  Register To Reply