Conditional Formatting the Entire Row based on a Column in Google Sheets

I was compiling some data and couldn't make this type of formatting at first, after a few searches, I finally could do it and understood how the conditional formatting (referring as CF from this point on) works.

The following embedded sheet is the result:



In this sheet, I used the CF to color the background green if the DE (desktop environment) has Python listed in programming language, the third column.

The formatting is:
  • Range: A2:E16
  • Format cell if Custom formula is =FIND("Python", $C2)
When CF is applying, it tests cell after cell in the range we specified.  If the custom formula returns TRUE, or value is not 0 in this case, then the condition is met and the style is applied.  The CF checks $C2 for the word "Python", the column is fixed, that is the Column C, but not the row number, therefore, in cells of same row, they all are tested against the $C#, the same row number.  When testing other rows, it's like you expanding the cell and the formula automatically adjusted from row 2 to where the row is located.

Another example, if want to color the DEs were first released before 2000, the custom formula can be =DATEVALUE($B2) < DATE(2000, 1, 1).

You don't have to be satisfied with single column or within range, you can use more than one or coloring entire column instead of row.  Just remember this is just a formula as if you would drag the corner square to expand, then you should be able to write it.

Unfortunately, when applying this for color scale, which can't work for entire row based on the values of specific column—it sees values in the whole range as whole—it takes a lot of work, because you need to create several CFs for each color in the scale, but better than nothing.

Comments

Popular Posts