Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Networkdays function
Hi, I've been using the Networkdays function to work out the date 7 days
previous to today minus working days. I'm doing it in two stages, eg cell A1 = today(), cell A2 = 7, cell A3 = A1-A2, Cell A4 = Networkdays(A3, A1). However, it comes back with the answer 6 when I would expect to see 5. Does anyone know why that should happen? Also is there a quicker way of doing this? Help would be much appreciated. Thanks. Jean |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Networkdays function
Hi,
I'm not surprised you get 6 because networkdays includes the start and end date. For example there are 5 network days between 1/1/2007 and 5/1/2007 so in your case going back 7 days from today takes us to 6/7/2007 which is last Friday and Friday to Friday is 6 network days. An easier way =NETWORKDAYS(TODAY()-7,TODAY()) Mike "jeanmac" wrote: Hi, I've been using the Networkdays function to work out the date 7 days previous to today minus working days. I'm doing it in two stages, eg cell A1 = today(), cell A2 = 7, cell A3 = A1-A2, Cell A4 = Networkdays(A3, A1). However, it comes back with the answer 6 when I would expect to see 5. Does anyone know why that should happen? Also is there a quicker way of doing this? Help would be much appreciated. Thanks. Jean |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Networkdays function
If you want to exclude the start date us
=NETWORKDAYS(A3,A1)-(WEEKDAY(A3,2)<=5) or =NETWORKDAYS(A3,A1)-(WEEKDAY(A1,2)<=5) to exclude the end date The test is so as not to exclude if the day is a weekend as NETWORKDAYS wouldn't have counted it anyway -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "jeanmac" wrote in message ... Hi, I've been using the Networkdays function to work out the date 7 days previous to today minus working days. I'm doing it in two stages, eg cell A1 = today(), cell A2 = 7, cell A3 = A1-A2, Cell A4 = Networkdays(A3, A1). However, it comes back with the answer 6 when I would expect to see 5. Does anyone know why that should happen? Also is there a quicker way of doing this? Help would be much appreciated. Thanks. Jean |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Networkdays function
Thanks to both Mike and Bob for your help. I couldn't find anywhere that
Networkdays included the start and end date, it wasn't clear in the help. Also thanks for the much better way of writing it. Jean "Bob Phillips" wrote: If you want to exclude the start date us =NETWORKDAYS(A3,A1)-(WEEKDAY(A3,2)<=5) or =NETWORKDAYS(A3,A1)-(WEEKDAY(A1,2)<=5) to exclude the end date The test is so as not to exclude if the day is a weekend as NETWORKDAYS wouldn't have counted it anyway -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "jeanmac" wrote in message ... Hi, I've been using the Networkdays function to work out the date 7 days previous to today minus working days. I'm doing it in two stages, eg cell A1 = today(), cell A2 = 7, cell A3 = A1-A2, Cell A4 = Networkdays(A3, A1). However, it comes back with the answer 6 when I would expect to see 5. Does anyone know why that should happen? Also is there a quicker way of doing this? Help would be much appreciated. Thanks. Jean |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
NETWORKDAYS function | Excel Discussion (Misc queries) | |||
NETWORKDAYS function | Excel Discussion (Misc queries) | |||
Nesting Networkdays function inside and If function | Excel Worksheet Functions | |||
Networkdays function | Excel Worksheet Functions | |||
Nested IF Function, Date Comparing, and NetworkDays Function | Excel Worksheet Functions |