# Thread: Help with Combining AND and OR statements (2003)

1. ## 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. ## 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", ""))

3. ## 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. ## 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"))

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

The attached screenshot should help.

6. ## 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. ## 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.

8. ## 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
•