ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Networkdays Function (https://www.excelbanter.com/excel-worksheet-functions/180347-networkdays-function.html)

Ron Bridgeman

Networkdays Function
 
When I enter "= NETWORKDAYS(DATE(2008,3,1),NOW())" into a cell in a
worksheet, it calculates perfectly. However, the second time that I close and
reopen the workbook, I receive a "#N/A" error. (I can close and reopen the
workbook once without an error.) The Analysis ToolPak is installed.

Can anyone explain why this is happening? Thanks

Ron Bridgeman[_2_]

Networkdays Function
 
Workbook in question is password protected. When I unprotect it, the problem
goes away. Don't know why password protection would cause a problem, but is
there any way to deal with this and retain password protection?

"Ron Bridgeman" wrote:

When I enter "= NETWORKDAYS(DATE(2008,3,1),NOW())" into a cell in a
worksheet, it calculates perfectly. However, the second time that I close and
reopen the workbook, I receive a "#N/A" error. (I can close and reopen the
workbook once without an error.) The Analysis ToolPak is installed.

Can anyone explain why this is happening? Thanks


Ross OZ

Networkdays Function
 
Ron
Try using "TODAY" instead of "NOW"
I have had problems in other areas and the "TODAY" as fixed it.
"NOW" is to the second and "TODAY" is to the day only.
Hope it works for you


"Ron Bridgeman" wrote:

Workbook in question is password protected. When I unprotect it, the problem
goes away. Don't know why password protection would cause a problem, but is
there any way to deal with this and retain password protection?

"Ron Bridgeman" wrote:

When I enter "= NETWORKDAYS(DATE(2008,3,1),NOW())" into a cell in a
worksheet, it calculates perfectly. However, the second time that I close and
reopen the workbook, I receive a "#N/A" error. (I can close and reopen the
workbook once without an error.) The Analysis ToolPak is installed.

Can anyone explain why this is happening? Thanks


Ron Bridgeman[_2_]

Networkdays Function
 
Thanks. I tried it, but it didn't help. I appreciate your response.
Ron

"Ross OZ" wrote:

Ron
Try using "TODAY" instead of "NOW"
I have had problems in other areas and the "TODAY" as fixed it.
"NOW" is to the second and "TODAY" is to the day only.
Hope it works for you


"Ron Bridgeman" wrote:

Workbook in question is password protected. When I unprotect it, the problem
goes away. Don't know why password protection would cause a problem, but is
there any way to deal with this and retain password protection?

"Ron Bridgeman" wrote:

When I enter "= NETWORKDAYS(DATE(2008,3,1),NOW())" into a cell in a
worksheet, it calculates perfectly. However, the second time that I close and
reopen the workbook, I receive a "#N/A" error. (I can close and reopen the
workbook once without an error.) The Analysis ToolPak is installed.

Can anyone explain why this is happening? Thanks


JP[_4_]

Networkdays Function
 
Try un-installing and re-installing the ATP, that usually works for
me.


HTH,
JP

On Mar 19, 2:04*pm, Ron Bridgeman
wrote:
Thanks. *I tried it, but it didn't help. I appreciate your response.
Ron



"Ross OZ" wrote:
Ron
Try using "TODAY" instead of "NOW"
I have had problems in other areas and the "TODAY" as fixed it.
"NOW" is to the second and "TODAY" is to the day only.
Hope it works for you


"Ron Bridgeman" wrote:


Workbook in question is password protected. When I unprotect it, the problem
goes away. Don't know why password protection would cause a problem, but is
there any way to deal with this and retain password protection?


"Ron Bridgeman" wrote:


When I enter "= NETWORKDAYS(DATE(2008,3,1),NOW())" into a cell in a
worksheet, it calculates perfectly. However, the second time that I close and
reopen the workbook, I receive a "#N/A" error. *(I can close and reopen the
workbook once without an error.) The Analysis ToolPak is installed.


Can anyone explain why this is happening? *Thanks- Hide quoted text -


- Show quoted text -



joeu2004

Networkdays Function
 
Off-topic....

Does it bother anyone else that NETWORKDAYS has nothing to do with the
Internet (aka "networking")?

And where is the function that computes "gross" work days?

8-] 8-]

JP[_4_]

Networkdays Function
 
Or "networking" as in making business contacts...?

--JP

On Mar 19, 4:59*pm, joeu2004 wrote:
Off-topic....

Does it bother anyone else that NETWORKDAYS has nothing to do with the
Internet (aka "networking")?

And where is the function that computes "gross" work days?

8-] 8-]



Gord Dibben

Networkdays Function
 
joeu2004

"NET" is a valid term as in "net profits" so why should it bother you when Excel
uses it?

"gross workdays" function is NETWORKDAYS function with no designated holidays
range.

Or it could be just a count of cells with days worked entered.


Gord Dibben MS Excel MVP

On Wed, 19 Mar 2008 14:14:23 -0700 (PDT), JP wrote:

Or "networking" as in making business contacts...?

--JP

On Mar 19, 4:59*pm, joeu2004 wrote:
Off-topic....

Does it bother anyone else that NETWORKDAYS has nothing to do with the
Internet (aka "networking")?

And where is the function that computes "gross" work days?

8-] 8-]



joeu2004

Networkdays Function
 
On Mar 19, 3:12*pm, Gord Dibben <gorddibbATshawDOTca wrote:
"NET" is a valid term as in "net profits" so why should it bother you
when Excel uses it?

"gross workdays" function is NETWORKDAYS function with no
designated holidays range.


My point exactly: I don't believe there is a single business person
who thinks of, much less refers to, "net" work days, meaning all
("gross") work days less holidays.

Moreover, regarding your analogy, I would never create a function
called NETPROFIT() that actually returns gross profit if arguments
change. It violates the Principle of Least Surprise.

Arguably, simply WORKDAYS is a more resonable name -- kinda like
DAYS360. I suspect that was avoided because of its similarity to
WORKDAY. (Refer to "Psychology of Computer Programming".)

But we are taking my comments too seriously. I was just pointing out
that I have to take a double-take every time someone asks about
NETWORKDAYS in these forums because my brain is wired (no pun
intended) to see that as "network days", not "net work days".
(Ignoring the nonsensical notion of "net" work days, in the first
place.)

If your brain is wired differently, more power to you.

Ron Bridgeman[_2_]

Networkdays Function
 
Thanks. I uninstalled and reinstalled a couple of times, but that didn't
help. There seems to be a problem with the timing of the Networkdays
function execution, i.e., "Networkdays" trying to execute before all the
information it needs is available. The nested functions in the expression
execute as they should. I have tested them separately. It might be helpful if
I understood what happens when Excel starts up, but I don't.

Thanks again.

"JP" wrote:

Try un-installing and re-installing the ATP, that usually works for
me.


HTH,
JP

On Mar 19, 2:04 pm, Ron Bridgeman
wrote:
Thanks. I tried it, but it didn't help. I appreciate your response.
Ron



"Ross OZ" wrote:
Ron
Try using "TODAY" instead of "NOW"
I have had problems in other areas and the "TODAY" as fixed it.
"NOW" is to the second and "TODAY" is to the day only.
Hope it works for you


"Ron Bridgeman" wrote:


Workbook in question is password protected. When I unprotect it, the problem
goes away. Don't know why password protection would cause a problem, but is
there any way to deal with this and retain password protection?


"Ron Bridgeman" wrote:


When I enter "= NETWORKDAYS(DATE(2008,3,1),NOW())" into a cell in a
worksheet, it calculates perfectly. However, the second time that I close and
reopen the workbook, I receive a "#N/A" error. (I can close and reopen the
workbook once without an error.) The Analysis ToolPak is installed.


Can anyone explain why this is happening? Thanks- Hide quoted text -


- Show quoted text -




George Nicholson

Networkdays Function
 
My brain is wireless, but I have trouble picking up a signal sometimes.

--
HTH,
George


"joeu2004" wrote in message
...
On Mar 19, 3:12 pm, Gord Dibben <gorddibbATshawDOTca wrote:
"NET" is a valid term as in "net profits" so why should it bother you
when Excel uses it?

"gross workdays" function is NETWORKDAYS function with no
designated holidays range.


My point exactly: I don't believe there is a single business person
who thinks of, much less refers to, "net" work days, meaning all
("gross") work days less holidays.

Moreover, regarding your analogy, I would never create a function
called NETPROFIT() that actually returns gross profit if arguments
change. It violates the Principle of Least Surprise.

Arguably, simply WORKDAYS is a more resonable name -- kinda like
DAYS360. I suspect that was avoided because of its similarity to
WORKDAY. (Refer to "Psychology of Computer Programming".)

But we are taking my comments too seriously. I was just pointing out
that I have to take a double-take every time someone asks about
NETWORKDAYS in these forums because my brain is wired (no pun
intended) to see that as "network days", not "net work days".
(Ignoring the nonsensical notion of "net" work days, in the first
place.)

If your brain is wired differently, more power to you.



Ron Bridgeman[_2_]

Networkdays Function
 
I finally found a workaround to replace the NETWORKDAYS function at the
website
http://www.dicks-blog.com/archives/2...-addin-part-2/.
NETWORKDAYS EQUIVALENT
=SUMPRODUCT(-(WEEKDAY(ROW(INDIRECT(start_date&":"&end_date)))< 1),(-(WEEKDAY(ROW(INDIRECT(start_date&":"&end_date)))< 7)),-(COUNTIF(holidays,ROW(INDIRECT(start_date&":"&end_ date)))=0))*(1-2*(start_dateend_date)).
This seems to work. Thanks for all comments.

"Ron Bridgeman" wrote:

When I enter "= NETWORKDAYS(DATE(2008,3,1),NOW())" into a cell in a
worksheet, it calculates perfectly. However, the second time that I close and
reopen the workbook, I receive a "#N/A" error. (I can close and reopen the
workbook once without an error.) The Analysis ToolPak is installed.

Can anyone explain why this is happening? Thanks



All times are GMT +1. The time now is 07:07 PM.

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