0

I have an issue with my excel conditional formatting. It seems to work only on one column, regardless if its moved and the columns in the rule changed. My rule is as follows, I tried to space it out to make it more readable but its obviously not in actual rule box:

=IF(EXACT(BQ2,"Diamond"), //start if
  OR(ISNUMBER(SEARCH("CRATE%",BM2,1)),ISNUMBER(SEARCH("CDMG%",BM2,1))), //if true
 IF(EXACT(BQ2,"Square"), //if false start another if
  OR(ISNUMBER(SEARCH("RES%",BM2,1)),ISNUMBER(SEARCH("CDMG%",BM2,1))), //if true
 IF(EXACT(BQ2,"Triangle"), //if false start another if
  OR(ISNUMBER(SEARCH("CRATE%",BM2,1)),ISNUMBER(SEARCH("RES%",BM2,1)))))) //if true

My rule is that if the cell's value is "Diamond" the words "CRATE%" and "CDMG%" will trigger the cell to turn blue,

if "Square" the words "RES%" and "CDMG%" will trigger the cell to turn blue.

if "Triangle" the words "RES%" and "CRATE%" will trigger the cell to turn blue.

The three Shape values and what words they check for are on the same row. They change per row but only between those three shapes and few words.

This same format occurs on the next two columns as well, however, the next two columns, which receive the same rule and adjusted column names, will not work.

Am I doing too many calculations or is my rule wrong to begin with or is it another issue all together?

Here is a screenshot of the data in the sheet. As you can see, column BQ works fine, but even with the same rule on BR and changing BQ2->BR2 and BM2->BN2, the second row, will not work. Neither will the third. The top Formatting Box is for the first column, and the bottom for the second column. enter image description here The second rule is just a NOT version of the first rule, designed to reverse the blue box when it is "Correct." Im sure this is bad way to reverse it but that is not what Im here for.

2
  • This may be a stupid question, but when you create a the rule for the BR column, have you made sure that you have the correct range in the "Applies to" box? Commented May 4, 2017 at 10:31
  • Apologies for the late reply but yes I did ensure that the Applies to was for all my data in that column. I will try your solution here momentarily though and get back to you. Commented May 10, 2017 at 4:42

1 Answer 1

1

I made a copy of the BM, BN, BQ and BR columns in your screenshot and created one set of rules for column BM and BQ and a second set of rules for BN and BR, as described in your question. Both seemed to work as intended.

Rules for BM/BQ, applied to cells BQ1 to BQ16:

=IF(EXACT(BQ1,"Diamond"),OR(ISNUMBER(SEARCH("CRATE%",BM1,1)),ISNUMBER(SEARCH("CDMG%",BM1,1))),IF(EXACT(BQ1,"Square"),OR(ISNUMBER(SEARCH("RES%",BM1,1)),ISNUMBER(SEARCH("CDMG%",BM1,1))),IF(EXACT(BQ1,"Triangle"),OR(ISNUMBER(SEARCH("CRATE%",BM1,1)),ISNUMBER(SEARCH("RES%",BM1,1))))))

=NOT(IF(EXACT(BQ1,"Diamond"),OR(ISNUMBER(SEARCH("CRATE%",BM1,1)),ISNUMBER(SEARCH("CDMG%",BM1,1))),IF(EXACT(BQ1,"Square"),OR(ISNUMBER(SEARCH("RES%",BM1,1)),ISNUMBER(SEARCH("CDMG%",BM1,1))),IF(EXACT(BQ1,"Triangle"),OR(ISNUMBER(SEARCH("CRATE%",BM1,1)),ISNUMBER(SEARCH("RES%",BM1,1)))))))

Rules for BN/BR, applied to cells BR1 to BR16:

=IF(EXACT(BR1,"Diamond"),OR(ISNUMBER(SEARCH("CRATE%",BN1,1)),ISNUMBER(SEARCH("CDMG%",BN1,1))),IF(EXACT(BR1,"Square"),OR(ISNUMBER(SEARCH("RES%",BN1,1)),ISNUMBER(SEARCH("CDMG%",BN1,1))),IF(EXACT(BR1,"Triangle"),OR(ISNUMBER(SEARCH("CRATE%",BN1,1)),ISNUMBER(SEARCH("RES%",BN1,1))))))

=NOT(IF(EXACT(BR1,"Diamond"),OR(ISNUMBER(SEARCH("CRATE%",BN1,1)),ISNUMBER(SEARCH("CDMG%",BN1,1))),IF(EXACT(BR1,"Square"),OR(ISNUMBER(SEARCH("RES%",BN1,1)),ISNUMBER(SEARCH("CDMG%",BN1,1))),IF(EXACT(BR1,"Triangle"),OR(ISNUMBER(SEARCH("CRATE%",BN1,1)),ISNUMBER(SEARCH("RES%",BN1,1)))))))

As you can see, in the second rule set, I only replaced BM with BN and BQ with BR. It works fine here.enter image description here I hope this works for you.

Sign up to request clarification or add additional context in comments.

2 Comments

This was not the problem with my Excel but it did lead me to find the real mistake. Originally, the three rows of varying shapes were one column. I used Text to Columns to split them up and it did its job properly, or so I thought. The text was delimited on a comma with my data per column looking like this "Diamond, Square, Triangle" The first column received the correct text "Diamond" but the latter two received " Square" and " Triangle" The leading space was screwing up the whole equation, making it perpetually false. Thank you for taking time to help me out!
Ah, of course. That kind of problem is nigh on impossible to identify. It was my pleasure to be of help, and I'm glad you found the error eventually. Keep Excel-ing :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.