# Help with IF AND OR

1. ## Help with IF AND OR

I'm really new at all of this and I've been racking my brain for a while on this. To no avail, I am coming up with errors.

Here's what I'm trying to do:

I need to get a cell to read "Flammable" only under these conditions:

“FLAMMABLE” ONLY IF B22 > 1000, but < 8820

AND

“FLAMMABLE” ONLY WHEN B22 is >8820 AND THERE ARE VALUES GREATER THAN 0 in ANY of the following boxes: C22,E22:G22,I22,K22,M22,N22

Any help would be greatly appreciated!

2. ## Re: Help with IF AND OR

Try:
Formula:
`Please Login or Register  to view this content.`

3. ## Re: Help with IF AND OR

=IF(or(AND( B22 > 1000, B22 < 8820), and(sum(B22 > 8820, C22,E22:G22,I22,K22,M22,N22)>0)), "FLAMMABLE", "")

4. ## Re: Help with IF AND OR

I'm confused, but that's fine - ignore me if the following makes no sense.

For the sake of the following discussion:
Expression-1 =
“FLAMMABLE” ONLY IF B22 > 1000, but < 8820

Expression-2 =
“FLAMMABLE” ONLY WHEN B22 is >8820 AND THERE ARE VALUES GREATER THAN 0 in ANY of the following boxes: C22,E22:G22,I22,K22,M22,N22

The required result is Expression-1 AND Expression-2

If B22>= 8820 then Expression-1 is FALSE and so the whole expression is FALSE

If B22 < 8820 then Expression-2 is FALSE and so the whole expression is FALSE.

So in summary we should never get Flammable = TRUE

5. ## Re: Help with IF AND OR

This worked perfectly mehmetcik , thank you so much.

There are currently 1 users browsing this thread. (0 members and 1 guests)

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