Search code examples
google-sheetsgoogle-sheets-formula

Is there a way to apply conditional formatting based on a single formula across multiple columns in Google Sheets?


I'm trying to do some conditional formatting using custom forumulas on a table that I have.

Here's a link to spreadsheet with sample representative data.

This is what the table looks like

What I'm trying to do here is for every cell from F4:V11, I want to color code the cell based on whether it is above or below the SLA for that row as defined in column C. A hard coded example of this is on rows 10 and 11.

For example, U11 is color coded green because 89 is greater than the SLA of 75 for that row. However V11 is colored red because 41 is lesser than the SLA of 75 for that row.

As an extension to this question, I want to use the value in column D to determine if the SLA breach is defined as lower than the SLA value or higher than the SLA value.

I've tried using custom formulas to make this happen.

The problem with this is that the forumula applies to the whole row in the range - for example in the forumula I am using a range of U4:V11, checking for $V4>$C4; but the check for column V also applies to column U in the range.

While I can theoretically create a new forumula for every column and check that ways, this would mean doing this 52 times (1 per week) per sheet, and there are currently 50+ such sheets with data for different cohorts. So I am looking for a way to do this with a single formula per sheet.


Solution

  • What about below CF rule?

    =F4>$C4
    

    enter image description here