# Conditional formatting formula that is case sensitive

#### PatrickSchmidt

##### New Member
Hello,
I am trying to highlight cells that contain anything other that a capital "Y" or capital "N". this is what I have so far, it's working but it is not case sensitive =NOT(OR(A1="Y",A1="N")). I tried using CHAR(ASCII#) and also tried to nest the FIND function but could not get them to work.

I'm also having trouble with my next step for this. In my spread sheet if lets say A1:J1 are either blank or have "Y" in them then I would put "\$\$" in K1. If any of those cells contain a "N" there should not be "\$\$" in K1. So I would like a formula where if K1="\$\$" then look at A1:J1, if those cells contain anything other than "Y" then highlight K1.

Thank you in advance. I really appreciate all the help I've gotten from the people on this forum!

#### Special-K99

##### Well-known Member
First part

=(AND(CODE(A1)<>89,CODE(A1)<>78))

• PatrickSchmidt

#### Momentman

##### Well-known Member
For the second part, in K!, use =AND(K1="\$\$",COUNTIF(\$A\$1:\$J\$1,"Y")<>10)

The 10 is from the fact that there are 10 cells from A1 to J1,

• PatrickSchmidt

#### PatrickSchmidt

##### New Member
First part

=(AND(CODE(A1)<>89,CODE(A1)<>78))
Perfect! Thanks so much!!

For the second part, in K!, use =AND(K1="\$\$",COUNTIF(\$A\$1:\$J\$1,"Y")<>10)

The 10 is from the fact that there are 10 cells from A1 to J1,
Thank you for the response,

I don't want to highlight K1 if A1:J1 have blanks or Y's. I'm sorry I didn't specify that.

#### Momentman

##### Well-known Member
I don't want to highlight K1 if A1:J1 have blanks or Y's. I'm sorry I didn't specify that.
So what do you want exactly, if you could just restate?

#### PatrickSchmidt

##### New Member
So what do you want exactly, if you could just restate?

If K1="\$\$" then A1:J1 should be either blank or "Y", if there is anything else in A1:J1 then highlight K1

#### PatrickSchmidt

##### New Member
Well this will probably make some folks on here laugh but I got it working haha

=IF(AND(K7="\$\$", A7<>"y",A7<>""),TRUE,IF(AND(K7="\$\$", B7<>"y",B7<>""),TRUE,IF(AND(K7="\$\$", C7<>"y",C7<>""),TRUE,IF(AND(K7="\$\$", D7<>"y",D7<>""),TRUE,IF(AND(K7="\$\$", E7<>"y",E7<>""),TRUE,IF(AND(K7="\$\$", F7<>"y",F7<>""),TRUE,IF(AND(K7="\$\$", G7<>"y",G7<>""),TRUE,IF(AND(K7="\$\$", H7<>"y",H7<>""),TRUE,IF(AND(K7="\$\$", I7<>"y",I7<>""),TRUE,IF(AND(K7="\$\$", J7<>"y",J7<>""),TRUE,FALSE))))))))))

That's a lot of IF's

Thanks everyone!