Excel: If contains *text part1* OR *text part2 then...

Solved
Fab -  
 Fab -
Hello,

I can't find how to write the formula to make the following request.

If in Cell A1, you find the word *black* OR the word *red* in the string, then show me the value 1; otherwise, show 0.

Hoping you can help me :-)
Have a good day.
Configuration: Windows / Firefox 52.0

1 answer

  1. Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   5 147
     
    Hello,

    look at it like this
    =IF(OR(COUNTIF(A1,"*black*"),COUNTIF(A1,"*red*")),1,0)

    --
    See you
    Mike-31

    I’m responsible for what I say, not for what you understand...
    5
    1. Fab
       
      Hello Mike-31
      That's perfect, thank you very much for the quick response.
      0