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

    Expand IF statement (2003)

    Greetings,

    I have the following formula (which works): =IF(AW2="Incorporated",DE2-HV2+1,IF(DE2="",IF(HV2="","",TODAY()-HV2),DE2-HV2+1))

    Now, I tried the following (which DOES NOT function)

    =IF(AW2="Incorporated",IF(DC="Change Cancelled",IF(DC="Change Rejected",DE2-HV2+1,IF(DE2="",IF(HV2="","",TODAY()-HV2),DE2-HV2+1))))

    Columns AW and DC are always text

    DE and HV are always dates

    Any Ideas?

    Thanks,
    Brad

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

    Re: Expand IF statement (2003)

    What is DC? A defined name? It is not a reference to a cell since there is no row number.

    The formula makes no sense because if DC (whatever it means) is equal to "Change Cancelled", it cannot be equal to "Change Rejected".

    Could you try to explain what the formula should do?

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

    Re: Expand IF statement (2003)

    Oops..

    should have stated DC2. DC2 could contain Change Cancelled, Change Rejected, Change Approved.

    The expectation is as follows

    IF the contents of AW2 = Incorporated, or if the contents of DC2 is Change Cancelled or Change Rejected then DE2-HV2+1, else if DE2= blank, of if HV2 =blank, then today-HV2 else DE2-HV2+1

    Now, without the extra check for Change Cancelled and Change Rejected the formula works.

    However I need the additional check so that the resultant number is correct.

    The number returned is a count of days in whole numbers. Because of the data, the extra check is necessary to get the Real numbers.


    Brad

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

    Re: Expand IF statement (2003)

    The solution is in the way you state the condition: you should use the OR function

    =IF(OR(AW2="Incorporated",DC2="Change Cancelled",DC2="Change Rejected"),DE2-HV2+1,IF(DE2="",IF(HV2="","",TODAY()-HV2),DE2-HV2+1))

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

    Re: Expand IF statement (2003)

    Wonderful....

    misplaced the OR function.....

    banging my head now.


    Thks,
    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
  •