How to apply conditional formatting only if cell has X value? [google sheet]

by Floris Assies   Last Updated February 18, 2019 09:03 AM - source

I have a sheet with statistical data to which I had applied color scale conditional formatting. Some rows I set to have green for highest and red for lowest number in row and other rows the other way around because I lower score would be better than lower.

But when applying a filter to the sheet and changing the order, I noticed that the conditional formatting got messed up and rows that I had set to have the highest number green had become red and visa versa.

Is it possible to solve this with a conditional formatting that is only applied when cell in another column has a certain value?

for example:

If the cell in column C in the same row has value "metric A" then apply color scale green to lowest en red to highest number.


if the cell in column C in the same row has value "metric B" then apply color scale red to lowest and green to highest number.

or is there a better way, or some basic google sheet conditional formatting rule that applies when using filters that I am not aware of?

Related Questions

Conditional If Formatting Based on Two Columns

Updated February 04, 2018 22:03 PM

How to use AND in Google Sheets w multiple criteria

Updated March 12, 2018 20:03 PM

Conditional Formating in Google Sheets

Updated April 07, 2018 20:03 PM