Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to use networkdays function. Please note your help on this topic
- I have pasted the e.g. in question below: a2 = 6/8/2007 a3 = 6/20/2007 Formula Description 1. =A3-A2 Days between the two dates (12) 2. =NETWORKDAYS(A2,A3) Weekdays between the two dates (9) The difference in 1 is correct - there is 12 days between - i am trying to find a duration period here. The difference in 2 is incorrect - 12 days - 4 weekend days - should be 8 It seems to be including the start date which is what happens when I uses this function in my spreadsheet. It is calcuating 1 extra day. Please tell me how this function can work correctly. I cant just take 1 day off as it might not always span a weekend. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Wed, 4 Oct 2006 18:46:02 -0700, sesler2
wrote: I am trying to use networkdays function. Please note your help on this topic - I have pasted the e.g. in question below: a2 = 6/8/2007 a3 = 6/20/2007 Formula Description 1. =A3-A2 Days between the two dates (12) 2. =NETWORKDAYS(A2,A3) Weekdays between the two dates (9) The difference in 1 is correct - there is 12 days between - i am trying to find a duration period here. The difference in 2 is incorrect - 12 days - 4 weekend days - should be 8 It seems to be including the start date which is what happens when I uses this function in my spreadsheet. It is calcuating 1 extra day. Please tell me how this function can work correctly. I cant just take 1 day off as it might not always span a weekend. Networkdays includes both start_date and end_data in its calculation. So if your start_date was Monday, and your end_date was Friday, networkdays would show that you worked five days. If your start_date was Monday, and your end_date the following Monday, Networkdays would show that you worked six days. Here is the logic for treating it this way: If I was the employee, and Monday was my start_date, and Friday my end_date, I would sure want to get paid for five days. Similarly, if my start_date at work was Friday june 8, 2007, and my last day at work was Wednesday, June 20, 2007, I'd sure want to get paid for nine days, and not eight. In any event, if you don't want to include either start_date or end_date, merely subtract one. --ron |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=NETWORKDAYS(A2,A3-1)
"sesler2" wrote: I am trying to use networkdays function. Please note your help on this topic - I have pasted the e.g. in question below: a2 = 6/8/2007 a3 = 6/20/2007 Formula Description 1. =A3-A2 Days between the two dates (12) 2. =NETWORKDAYS(A2,A3) Weekdays between the two dates (9) The difference in 1 is correct - there is 12 days between - i am trying to find a duration period here. The difference in 2 is incorrect - 12 days - 4 weekend days - should be 8 It seems to be including the start date which is what happens when I uses this function in my spreadsheet. It is calcuating 1 extra day. Please tell me how this function can work correctly. I cant just take 1 day off as it might not always span a weekend. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
But if the start date and/or the end date isn't a weekday, then they're not
included in the difference. =networkdays(date(2006,10,7),date(2006,10,8))-1 won't return the correct answer. And if one of those dates is in the list of holidays, then it gets ugly fast--well, for me anyway. I was thinking that you could offset the dates to start on a Monday. But then holidays and weekends could screw it up (I think). Am I wrong? Ron Rosenfeld wrote: On Wed, 4 Oct 2006 18:46:02 -0700, sesler2 wrote: I am trying to use networkdays function. Please note your help on this topic - I have pasted the e.g. in question below: a2 = 6/8/2007 a3 = 6/20/2007 Formula Description 1. =A3-A2 Days between the two dates (12) 2. =NETWORKDAYS(A2,A3) Weekdays between the two dates (9) The difference in 1 is correct - there is 12 days between - i am trying to find a duration period here. The difference in 2 is incorrect - 12 days - 4 weekend days - should be 8 It seems to be including the start date which is what happens when I uses this function in my spreadsheet. It is calcuating 1 extra day. Please tell me how this function can work correctly. I cant just take 1 day off as it might not always span a weekend. Networkdays includes both start_date and end_data in its calculation. So if your start_date was Monday, and your end_date was Friday, networkdays would show that you worked five days. If your start_date was Monday, and your end_date the following Monday, Networkdays would show that you worked six days. Here is the logic for treating it this way: If I was the employee, and Monday was my start_date, and Friday my end_date, I would sure want to get paid for five days. Similarly, if my start_date at work was Friday june 8, 2007, and my last day at work was Wednesday, June 20, 2007, I'd sure want to get paid for nine days, and not eight. In any event, if you don't want to include either start_date or end_date, merely subtract one. --ron -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
That's true. I was not entirely clear.
I look at the NETWORKDAYS function as providing an inclusive count of all working days -- in other words, the number of working days, inclusive, from start_date to end_date. For example, you could project payroll with that information, where you couldn't by using an algorithm like end_date-start_date-weekends. If that is not the goal, then NETWORKDAYS is the wrong tool. On Wed, 04 Oct 2006 22:09:56 -0500, Dave Peterson wrote: But if the start date and/or the end date isn't a weekday, then they're not included in the difference. =networkdays(date(2006,10,7),date(2006,10,8))-1 won't return the correct answer. And if one of those dates is in the list of holidays, then it gets ugly fast--well, for me anyway. I was thinking that you could offset the dates to start on a Monday. But then holidays and weekends could screw it up (I think). Am I wrong? Ron Rosenfeld wrote: On Wed, 4 Oct 2006 18:46:02 -0700, sesler2 wrote: I am trying to use networkdays function. Please note your help on this topic - I have pasted the e.g. in question below: a2 = 6/8/2007 a3 = 6/20/2007 Formula Description 1. =A3-A2 Days between the two dates (12) 2. =NETWORKDAYS(A2,A3) Weekdays between the two dates (9) The difference in 1 is correct - there is 12 days between - i am trying to find a duration period here. The difference in 2 is incorrect - 12 days - 4 weekend days - should be 8 It seems to be including the start date which is what happens when I uses this function in my spreadsheet. It is calcuating 1 extra day. Please tell me how this function can work correctly. I cant just take 1 day off as it might not always span a weekend. Networkdays includes both start_date and end_data in its calculation. So if your start_date was Monday, and your end_date was Friday, networkdays would show that you worked five days. If your start_date was Monday, and your end_date the following Monday, Networkdays would show that you worked six days. Here is the logic for treating it this way: If I was the employee, and Monday was my start_date, and Friday my end_date, I would sure want to get paid for five days. Similarly, if my start_date at work was Friday june 8, 2007, and my last day at work was Wednesday, June 20, 2007, I'd sure want to get paid for nine days, and not eight. In any event, if you don't want to include either start_date or end_date, merely subtract one. --ron --ron |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
As a worker, I always felt that the day started at: 12:00:01AM and finished
11:59:59PM. So I'd want to include those end days. (Sometimes, my bosses disagreed!) Ron Rosenfeld wrote: That's true. I was not entirely clear. I look at the NETWORKDAYS function as providing an inclusive count of all working days -- in other words, the number of working days, inclusive, from start_date to end_date. For example, you could project payroll with that information, where you couldn't by using an algorithm like end_date-start_date-weekends. If that is not the goal, then NETWORKDAYS is the wrong tool. On Wed, 04 Oct 2006 22:09:56 -0500, Dave Peterson wrote: But if the start date and/or the end date isn't a weekday, then they're not included in the difference. =networkdays(date(2006,10,7),date(2006,10,8))-1 won't return the correct answer. And if one of those dates is in the list of holidays, then it gets ugly fast--well, for me anyway. I was thinking that you could offset the dates to start on a Monday. But then holidays and weekends could screw it up (I think). Am I wrong? Ron Rosenfeld wrote: On Wed, 4 Oct 2006 18:46:02 -0700, sesler2 wrote: I am trying to use networkdays function. Please note your help on this topic - I have pasted the e.g. in question below: a2 = 6/8/2007 a3 = 6/20/2007 Formula Description 1. =A3-A2 Days between the two dates (12) 2. =NETWORKDAYS(A2,A3) Weekdays between the two dates (9) The difference in 1 is correct - there is 12 days between - i am trying to find a duration period here. The difference in 2 is incorrect - 12 days - 4 weekend days - should be 8 It seems to be including the start date which is what happens when I uses this function in my spreadsheet. It is calcuating 1 extra day. Please tell me how this function can work correctly. I cant just take 1 day off as it might not always span a weekend. Networkdays includes both start_date and end_data in its calculation. So if your start_date was Monday, and your end_date was Friday, networkdays would show that you worked five days. If your start_date was Monday, and your end_date the following Monday, Networkdays would show that you worked six days. Here is the logic for treating it this way: If I was the employee, and Monday was my start_date, and Friday my end_date, I would sure want to get paid for five days. Similarly, if my start_date at work was Friday june 8, 2007, and my last day at work was Wednesday, June 20, 2007, I'd sure want to get paid for nine days, and not eight. In any event, if you don't want to include either start_date or end_date, merely subtract one. --ron --ron -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookup Data in two seperate Spreadsheets | Excel Worksheet Functions | |||
Can't use Find function in formula | Excel Discussion (Misc queries) | |||
how to find time difference between timestamps to a millisecond? | New Users to Excel | |||
What function would let me find Batting Averages? | Excel Worksheet Functions | |||
What function would let me find Batting Averages? | Excel Worksheet Functions |