• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

If any part of text in cell range contains a value

t33p33

New Member
I have a spreadsheet with colors listed in cells. The cell may contain the name of the color, plus other text. I am looking to return a value of True or False if any cell in the range contains yellow or red.

Below are some examples of what cells in the range may contain. As you can see. I am searching for the word Red or Yellow. I cannot guarantee an exact match in the cell. If any cell in the range (C6:G6) contains Yellow or Red then I want to return the value of True.
  • Cell C6 contains "Yellow &#8710"
  • Cell D6 contains "Green
  • Cell E6 contains "Red !"
  • Cell F6 contains "Green &#10004"
  • Cell G6 contains "Yellow"

Tried =COUNTIFS(C6:G6,"*Yellow*",C6:G6,"*Red*") thinking I could just evaluate a number larger than 0 later, but even this is not adding up to 3 for the above example. :(

Alternately it could also be that if all cells in the range contain Green, then a value of True could be displayed.

I can do this with an exact match, but with the cells not containing exact matches, I am stuck. Any help would be greatly appreciated.
 
Last edited:
Back
Top