Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with Combining AND and OR statements (2003)

    I cannot work out how to combine the following forumulas into one, any help would be appreciated.


    =IF(OR(H5="Cancelled by IBM",H5="Completed and not billed"),"Please enter reason", "")

    =IF(AND(150<K5,K5<3000),"Please enter specific reason for delayed billing","")

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Help with Combining AND and OR statements (2003)

    Hi jj,

    There are numerous way to combine these formulae, but we'd need to know what the intended result is.

    Here, for example, are just two of the many possibilities:
    =IF(OR(H5="Cancelled by IBM",H5="Completed and not billed"),"Please enter reason", IF(AND(150<K5,K5<3000),"Please enter specific reason for delayed billing",""))
    =IF(AND(150<K5,K5<3000),"Please enter specific reason for delayed billing",IF(OR(H5="Cancelled by IBM",H5="Completed and not billed"),"Please enter reason", ""))
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Combining AND and OR statements (2003)

    Thse both work to a certain extend, the first formula works better for me but the bit which does not work is where if "Cancelled by IBM” or “Completed and not billed”
    Condition is met then the wording: “Please enter reason is not show” should be shown. This should overwrite the “Please enter specific reason for delayed billing” text if this condition is valid.

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Help with Combining AND and OR statements (2003)

    Hi jj,

    As I said: we'd need to know what the intended result is. It's still not clear what should happen in each case. I'm guessing from your response that it could be:
    =IF(OR(H5="Cancelled by IBM",H5="Completed and not billed",AND(150<K5,K5<3000)),"Please enter reason","Please enter specific reason for delayed billing"))
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Combining AND and OR statements (2003)

    The attached screenshot should help.
    Attached Images Attached Images

  6. #6
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Help with Combining AND and OR statements (2003)

    The screen shot does not help, you need to indicate to us what the logic is. What conditions give what message and under what other conditions do you want a different message and under what conditions do you want no message?

    Steve

  7. #7
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Help with Combining AND and OR statements (2003)

    Hi jj,

    As Steve says, the screenshot doesn't help and you need to tell us the logic - I'm not going to keep guessing all night (its after 11PM here) on the off-chance that I might make the right guess.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  8. #8
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Combining AND and OR statements (2003)

    I resolve the issue in that l removed the “” at the end of first IF statement with the next IF statement and this resovled the problem.

Posting Permissions

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