Search code examples
google-sheetsgoogle-sheets-formulaconditional-formatting

Google Sheets conditional formatting based on a series of values in a range


I want to set conditional formatting for a range based on whether the values of a cell match any value in another range.

I currently accomplish this by using OR:

=OR($C4=$F$4,$C4=$F$5,$C4=$F$6,$C4=$F$7)

Is there a way to do this without setting each cell in the reference range individually? If so, would the same formula work for TEXT instead of values? Sample sheet linked below: conFor tab.

https://docs.google.com/spreadsheets/d/1Z98qH07-r2Q_Q9IHzKVinLbLPaVbghskU61G0egiWz0/edit#gid=1336453380


Solution

  • Try

    =not(iserror(MATCH(B4,$F$4:$F$7,0)))
    

    Reference: