![]() |
Subtact 2 dates to get the number without counting weekends?
How do I enter a formula that subtracts 2 dates and returns a number (days)
that does not include weekends? |
Subtact 2 dates to get the number without counting weekends?
=NETWORKDAYS(A2,A1)
A2 holds the later date, A1 holds the earlier one. HTH Kostis Vezerides kjc wrote: How do I enter a formula that subtracts 2 dates and returns a number (days) that does not include weekends? |
Subtact 2 dates to get the number without counting weekends?
If you have the Analysis ToolPak add-in installed:
A1 = start date B1 = end date =NETWORKDAYS(A1,B1)-1 If you don't have the ATP installed, try one of these: =SUM(INT((WEEKDAY(A1-{1,2,3,4,5},2)+B1-A1)/7))-1 =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)<6))-1 Biff "kjc" wrote in message ... How do I enter a formula that subtracts 2 dates and returns a number (days) that does not include weekends? |
Subtact 2 dates to get the number without counting weekends?
Use the networkdays function. You should enter the start and end dates using
the dates function. -- http://HelpExcel.com "kjc" wrote: How do I enter a formula that subtracts 2 dates and returns a number (days) that does not include weekends? |
Subtact 2 dates to get the number without counting weekends?
Hello - I do not have the Analysis ToolPak but I did use your suggestion
below (=SUM(INT etc. and it seems to have worked. Could you provide me with what this formula is stating so I can better understand? Many thanks! "T. Valko" wrote: If you have the Analysis ToolPak add-in installed: A1 = start date B1 = end date =NETWORKDAYS(A1,B1)-1 If you don't have the ATP installed, try one of these: =SUM(INT((WEEKDAY(A1-{1,2,3,4,5},2)+B1-A1)/7))-1 =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)<6))-1 Biff "kjc" wrote in message ... How do I enter a formula that subtracts 2 dates and returns a number (days) that does not include weekends? |
Subtact 2 dates to get the number without counting weekends?
To be honest, I don't know the logic behind that particular formula, I just
know that it works. I know the "mechanics", but explaining the mechanics won't help in understanding the logic (or, "why it works"). I'm not sure of the original author, maybe Daniel Maher. Because I don't know the logic of that formula, I prefer the other formula because I do know the logic behind it. Biff "kjc" wrote in message ... Hello - I do not have the Analysis ToolPak but I did use your suggestion below (=SUM(INT etc. and it seems to have worked. Could you provide me with what this formula is stating so I can better understand? Many thanks! "T. Valko" wrote: If you have the Analysis ToolPak add-in installed: A1 = start date B1 = end date =NETWORKDAYS(A1,B1)-1 If you don't have the ATP installed, try one of these: =SUM(INT((WEEKDAY(A1-{1,2,3,4,5},2)+B1-A1)/7))-1 =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)<6))-1 Biff "kjc" wrote in message ... How do I enter a formula that subtracts 2 dates and returns a number (days) that does not include weekends? |
All times are GMT +1. The time now is 08:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com