ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting calendar days (https://www.excelbanter.com/excel-worksheet-functions/249985-counting-calendar-days.html)

musha-bsuha[_2_]

Counting calendar days
 
When I count calendar days, using =VALUE(B2-A2) or even just =(B2-A2), it
always omits one day. For instance 28/09/2009 to 30/09/2009 the formula
counts it as 2 days, while actually it's 3 days (28-29-30). How can I correct
this?

Mike H

Counting calendar days
 
Hi,

I'm not sure I agree with your reasoning but if that's what you want then
you'll have to do the subtraction and add 1 back

=B2-A2+1

Mike


"musha-bsuha" wrote:

When I count calendar days, using =VALUE(B2-A2) or even just =(B2-A2), it
always omits one day. For instance 28/09/2009 to 30/09/2009 the formula
counts it as 2 days, while actually it's 3 days (28-29-30). How can I correct
this?


Pete_UK

Counting calendar days
 
Use this:

=B2-A2+1

if you want to treat both dates as inclusive.

Hope this helps.

Pete

On Dec 3, 10:44*am, musha-bsuha
wrote:
When I count calendar days, using =VALUE(B2-A2) or even just =(B2-A2), it
always omits one day. For instance 28/09/2009 to 30/09/2009 the formula
counts it as 2 days, while actually it's 3 days (28-29-30). How can I correct
this?



David Biddulph[_2_]

Counting calendar days
 
Excel is, of course, correct, in that 30-28 =2, rather than 3.
If you want 3 instead of 2, the Excel method of adding one is to use +1.
Hence =B2-A2+1
--
David Biddulph

"musha-bsuha" wrote in message
...
When I count calendar days, using =VALUE(B2-A2) or even just =(B2-A2), it
always omits one day. For instance 28/09/2009 to 30/09/2009 the formula
counts it as 2 days, while actually it's 3 days (28-29-30). How can I
correct
this?





All times are GMT +1. The time now is 06:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com