Google-sheets – How to make the “Text contains” evaluate multiple values in Google Spreadsheet

conditional formattinggoogle sheets

I want the cell to be formatted if the cell contains any of the following words: blue, orange, red, green, and white. I also want to not make 5 different commands for each (this is because I have a loooong list in my actual file).

The entry blue|orange|red|green|white does not seem to work; nor does the entry blue OR orange OR red OR green OR white. How do I do this?

Best Answer

IMO better without "Text contains".

To avoid the possibility of conflicting rules, clear all conditional formatting from ColumnA (assumed because OP does not say where the data is), select it and apply a Custom formula is of:

=regexmatch(A1,"blue|green|orange|red|white")

Select your formatting and Done.

This will format blue-green as well as blue and Red car as well as red, but also coloured.

If to format only cells that contain the selected colour names (and nothing else, not for example White paper), try:

=match(A1,{"blue","green","orange","red","white"},0) 

For your locale you might need ; rather than ,.

REGEXMATCH.

MATCH.