This is the spreadsheet I'm working on. I am trying to figure out a formula for conditional formatting so that it only highlights the cells in red if none of the cells from columns N to Y of the Failed tab says either "Yes, I take this medication within the specified dosage range" or "I am unsure If I take this".

# Google-sheets – Conditional Formatting if all cells fail to meet a certain criteria

conditional formattinggoogle sheets

###### Related Topic

- Google-sheets – Conditional formatting with multiple criteria for a range of cells
- Google-sheets – Conditional Formatting Custom Formula: If certain cells in a row says “false”, then they should be highlighted in red
- Google-sheets – Conditional formatting cells close to minimum of the column
- Google-sheets – Google Sheets conditional formatting for multiple columns
- Google-sheets – Conditional Formatting in Google Sheets not working correctly
- Google-sheets – Conditional Formatting IF/AND Google Sheets
- Google-sheets – Google Sheets Conditional Formatting only applying formatting to certain cells
- Google-sheets – Conditional formatting on merged cells

## Best Answer

After selecting the range N2:Y, apply to it conditional formatting with "Custom formula is:"

Explanation:

`$N2:$Y2`

refers to the range N-Y in the current row.`regexmatch($N2:$Y2, "this|that")`

returns True when the cell contains either "this" or "that" (this is a substring search, which is appropriate in your case). Then`N`

converts True to 1 and False to 0. The whole array of these 1-0 values is then summed, and the formatting applies if the sum is 0, meaning there were no matches.