Conditional formatting if three conditions are true

K

kacperkolodziej

Hi! I have to do conditional formatting in one cell in excel and I've got three conditions:
1. value of this cell mustn't be bigger than 6 and smaller than one
2. value mustn't be equal "nk"
3. value mustn't be equal "zw"
If these three conditions are true, I want to use conditional formatting? Can you tell me how to do it?
 
R

Ron Rosenfeld

Hi! I have to do conditional formatting in one cell in excel and I've got three conditions:
1. value of this cell mustn't be bigger than 6 and smaller than one
2. value mustn't be equal "nk"
3. value mustn't be equal "zw"
If these three conditions are true, I want to use conditional formatting? Can you tell me how to do it?

Use a formula for the conditional formatting.

e.g. with a1 selected, you formula would be: =AND(A1<=6,A1>=1,A1<>"nk",A1<>"zw")
 
J

joeu2004

Ron Rosenfeld said:
Use a formula for the conditional formatting.
e.g. with a1 selected, you formula would be:
=AND(A1<=6,A1>=1,A1<>"nk",A1<>"zw")

Nothing wrong with the formula, but the last two conditions are superfluous.
It is sufficient to write:

=AND(A1<=6,A1>=1)

Note that if A1="nk" or A1="zw", A1<=6 would be false.

I suspect the real mistake in the OP's requirements. I wonder if they are
misstated or misinterpreted. (Although my interpretation is the same as
Ron's.)

Perhaps he means:

=OR(AND(A1<=6,A1>=1),AND(ISTEXT(A1),A1<>"nk",A1<>"zw"))

But is questionable whether ISTEXT(A1) is an intended condition.

PS: The OR() expression is not necessarily the most efficient
implementation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top