Search code examples
regexgoogle-sheetsgoogle-sheets-formulags-conditional-formatting

GS Conditional Formatting multiple range matching multiple values


On my Google Sheets document, I have two ranges with a dropdown list, and basically, I want to color cells according to the value selected of the dropdown list, but by a group of values.

Imagine the values possible are: toto, titi, tutu, foo, bar.

enter image description here

I would have one rule that apply a format on cells of columns A and C (A2:A11,C2:C11) that match toto or foo.


Solution

  • you can use regex like this:

    =REGEXMATCH(A2, "toto|foo")
    

    0