+ Reply to Thread
Results 1 to 3 of 3

Combining an If Statement with NETWORKDAYS function

  1. #1
    Registered User
    Join Date
    09-17-2003
    Location
    Scotland
    Posts
    59

    Combining an If Statement with NETWORKDAYS function

    Hi

    Here is my problem. I am trying to work out the number of working days between 2 dates to assess delivery performance. In some instances it is a positive number of days because goods have been delivered early and in others it is a negative number of days because goods have been delivered late. To get an accurate number of working days, I am using the NETWORKDAYS function and then subtracting 1 more day. This is fine where the number of days is a positve value but where the number of days is a negative value, I actually need to add 1 more day on. Hopefully the screenshot will illustrates this. The formula I have used in P2 is:

    =NETWORKDAYS(O2,N2)-1

    The answer appears as -5 but in actual fact it should be -3

    The formula has been copied in the remaining cells in column P. It gives the correct answer in P3 because this is a positive number of days.

    I wondered if I could combined an If statement with NETWORKDAYS but couldn't get this to work.

    Any help would be much appreciated

    Shirley Munro

  2. #2
    Bob Phillips
    Guest

    Re: Combining an If Statement with NETWORKDAYS function

    =NETWORKDAYS(O2,N2)+IF(NETWORKDAYS(O2,N2)>0,-1,1)

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "Shirley Munro" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi
    >
    > Here is my problem. I am trying to work out the number of working days
    > between 2 dates to assess delivery performance. In some instances it is
    > a positive number of days because goods have been delivered early and
    > in others it is a negative number of days because goods have been
    > delivered late. To get an accurate number of working days, I am using
    > the NETWORKDAYS function and then subtracting 1 more day. This is fine
    > where the number of days is a positve value but where the number of days
    > is a negative value, I actually need to add 1 more day on. Hopefully
    > the screenshot will illustrates this. The formula I have used in P2
    > is:
    >
    > =NETWORKDAYS(O2,N2)-1
    >
    > The answer appears as -5 but in actual fact it should be -3
    >
    > The formula has been copied in the remaining cells in column P. It
    > gives the correct answer in P3 because this is a positive number of
    > days.
    >
    > I wondered if I could combined an If statement with NETWORKDAYS but
    > couldn't get this to work.
    >
    > Any help would be much appreciated
    >
    > Shirley Munro
    >
    >
    > --
    > Shirley Munro
    > ------------------------------------------------------------------------
    > Shirley Munro's Profile:

    http://www.excelforum.com/member.php...nfo&userid=836
    > View this thread: http://www.excelforum.com/showthread...hreadid=554002
    >




  3. #3
    Registered User
    Join Date
    05-22-2019
    Location
    Milwaukee, WI
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1

    Re: Combining an If Statement with NETWORKDAYS function

    I have been banging my head against a wall trying to figure out how to do accomplish this and then I stumbled upon this thread. Thank you so much Bob!

+ 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