ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   calculate dates in Excel 2000 (https://www.excelbanter.com/excel-discussion-misc-queries/13607-calculate-dates-excel-2000-a.html)

Trainer

calculate dates in Excel 2000
 
I have a spreadsheet with two date columns, a holiday start date and a
holiday finish date. I need to calculate the amount of holidays taken but if
I subtract one from the other, I get the wrong answer. Eg 01/01/05 and
10/01/05, would be 10 days taken, however the formula returns only 9. Any
ideas please.
--
Trainer

Dave O

Look at the NETWORKDAYS() function: will that do it for you? Your Jan
1 through Jan 10 example includes two weekends, so NETWORKDAYS will not
be your best choice if you count weekend days as holidays.

If you say "I'll be on holiday from the 7th through the 10th" then
you'll be on holiday for 4 days. To express those 4 days
mathematically, the formula is 10 minus 7 plus 1. You can make your
original formula work by adding 1.


Jerry W. Lewis

If you subtract a start date from a finish date, you get the number of
days AFTER the start date, so add 1 to the result to get the number of
days INCLUDING the start date.

As Dave O. is pointing out, weekend days will be included in a simple
date subtraction, but are not usually counted in the amount of holidays
taken.

Jerry

Trainer wrote:

I have a spreadsheet with two date columns, a holiday start date and a
holiday finish date. I need to calculate the amount of holidays taken but if
I subtract one from the other, I get the wrong answer. Eg 01/01/05 and
10/01/05, would be 10 days taken, however the formula returns only 9. Any
ideas please.



Trainer

Thanks guys, I just wondered if there was a more sophisticated function that
had to be used, but as simply adding 1 works fine, that's OK. Cheers.

"Jerry W. Lewis" wrote:

If you subtract a start date from a finish date, you get the number of
days AFTER the start date, so add 1 to the result to get the number of
days INCLUDING the start date.

As Dave O. is pointing out, weekend days will be included in a simple
date subtraction, but are not usually counted in the amount of holidays
taken.

Jerry

Trainer wrote:

I have a spreadsheet with two date columns, a holiday start date and a
holiday finish date. I need to calculate the amount of holidays taken but if
I subtract one from the other, I get the wrong answer. Eg 01/01/05 and
10/01/05, would be 10 days taken, however the formula returns only 9. Any
ideas please.





All times are GMT +1. The time now is 04:51 AM.

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