+ Reply to Thread
Results 1 to 6 of 6

Getting Unexpected Result From NETWORKDAYS when

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003 / 2007 / 2010
    Posts
    5

    Getting Unexpected Result From NETWORKDAYS when

    OK - I'm having an issue and the details follow...

    The Purpose / Function
    OK - so the purpose of this is to calculate the days remaining between the committed completion date for a task and the current date. The lookup checks the task's status column against an array for Active/Inactive status so that the days remaining cell can be set null if the task is inactive (complete, held etc...) and the second (nested if) sets the cell to null if there is no commit date - or calculates the number of days remaining otherwise.

    The Formula
    =IF(VLOOKUP(X2,Reference!$A$42:$B$56,2)="Inactive","",IF(AA2="","",(NETWORKDAYS(TODAY(),AA2))))

    Relevant Columns / Variables
    * X - the status column for the row
    * AA - The commit date column for the row
    * Reference - a worksheet containing reference values - the noted array pairs status values with either "Inactive" or "Active"
    * Both date columns are short date data

    The Issue
    When the commit date = "today" NETWORKDAYS() returns "-2"

    Thoughts?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Getting Unexpected Result From NETWORKDAYS when

    =NETWORKDAYS(TODAY(), TODAY()) returns 0 or 1, depending on whether TODAY() is a weekend day.

    Suggest you watch the formula evaluate.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    08-24-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003 / 2007 / 2010
    Posts
    5

    Re: Getting Unexpected Result From NETWORKDAYS when

    Quote Originally Posted by shg View Post
    =NETWORKDAYS(TODAY(), TODAY()) returns 0 or 1, depending on whether TODAY() is a weekend day.

    Suggest you watch the formula evaluate.
    hmmm - am I missing something?
    From http://office.microsoft.com/en-us/ex...005209190.aspx
    NETWORKDAYS Returns the number of whole working days between start_date and end_date. Working days exclude weekends and any dates identified in holidays.
    The unexpected result is that today today minus yesterday would return -2 instead of -1.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Getting Unexpected Result From NETWORKDAYS when

    Networkdays includes both bookend dates.

    networkdays(today, tomorrow) returns 2 if both are weekdays.
    Last edited by shg; 08-24-2012 at 04:11 PM.

  5. #5
    Registered User
    Join Date
    08-24-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003 / 2007 / 2010
    Posts
    5

    Re: Getting Unexpected Result From NETWORKDAYS when

    Quote Originally Posted by shg View Post
    Networkdays includes both bookend dates.

    networkdays(today, tomorrow) returns 2 if both are weekdays.
    OK - so as I think about this - it is simply a matter of each day being viewed as a full day - and not with any directional / relational context. So networkdays(today, yesterday) counts both as full days - and I get a difference of -2 because the function counts all of today - and all of yesterday - nothing less... I think it makes sense - although it makes this a bunch less useful for me in that it creates confusion in my less interested team members, anger in the ones really concerned about perception, and angst in the managers that look at this data...

    Thanks much for taking the time to respond...
    Last edited by nhmiller; 08-24-2012 at 07:57 PM.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Getting Unexpected Result From NETWORKDAYS when

    Confusion, anger, and angst -- the apotheosis of office ethos achieved in a single function. Sublime.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1