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

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

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

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

Yes:

=DATEDIF(A1,B1,"d")+1

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??

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 )

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

serves the purpose, thanks a ton

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

You're welcome

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1