Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with IF statement (2000 sp3)

    All,
    I have the following calculation. It works fine, except that the result does not take in to account a reversed date situation.

    The formula calculates the number of work days between two dates. I would like to display the results when the condition is less than zero.

    =IF(NETWORKDAYS(G2,X2,Calendar!$E$1:$E$207)<0,"",1 +NETWORKDAYS(G2,X2,Calendar!$E$1:$E$207))

    Any Ideas,
    Brad

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Help with IF statement (2000 sp3)

    If you always want a positive result:

    =1+ABS(NETWORKDAYS(G2,X2,Calendar!$E$1:$E$207))

    If you want negative results to be displayed:

    =IF(NETWORKDAYS(G2,X2,Calendar!$E$1:$E$207)<0,-1+NETWORKDAYS(G2,X2,Calendar!$E$1:$E$207),1+NETWOR KDAYS(G2,X2,Calendar!$E$1:$E$207))

  3. #3
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with IF statement (2000 sp3)

    Hans,
    The second version of the formula is what I am looking for, however I think I need one more IF statement.
    =IF(NETWORKDAYS(G2,X2,Calendar!$E$1:$E$207)<0,-1+NETWORKDAYS(G2,X2,Calendar!$E$1:$E$207),1+NETWOR KDAYS(G2,X2,Calendar!$E$1:$E$207))

    The below is what I get:

    Date ARA Work Complete ARA Cycle Time (Work days)
    (27,186)
    (27,266)
    6-May-2005 4

    If the Complete date is blank, then do not calculate the number of days.
    If the complete date is populated, then calculate.
    If the complete date is populated, and less than the received date (column G for this calc) then show the negitive days.


    Hope this is clear.

    Brad

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Help with IF statement (2000 sp3)

    Try
    <code>
    =IF(X2="","",IF(NETWORKDAYS(G2,X2,Calendar!$E$1:$E $207)<0,-1+NETWORKDAYS(G2,X2,Calendar!$E$1:$E$207),1+NETWOR KDAYS(G2,X2,Calendar!$E$1:$E$207)))
    </code>
    I have assumed that the complete date is in X2.

  5. #5
    4 Star Lounger
    Join Date
    May 2002
    Location
    US
    Posts
    439
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with IF statement (2000 sp3)

    Hans,
    This did the trick! Thanks again,,,,,,


    BRad

Posting Permissions

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