Home > Back-end >  Google Sheet : How to format line by line with a rule based on highest value on the line?
Google Sheet : How to format line by line with a rule based on highest value on the line?

Time:02-17

I have a sheet like this one enter image description here

with plenty of lines and different values on each line.

I have done rule to format the line 3 based on pourcentage of the highest value of the line. It works for one line.

But if I copy paste this formatting rule to another line, the reference of the highest value is shared between all the lines who share the rule.

Example: enter image description here

As you can see, now the 3 line colors are based on the highest value of line 2 and 3.

The rule is enter image description here

What I want is to have the rule applied line by line. I can do manually. But I have 160 lines...

Is there a way to do that smartly ?

Thanks a lot

Bastien

CodePudding user response:

Add a column i in which you will calculate the maximum value of the current row. Then modify the conditional formatting to take this value into account for each row. Duplicate this conditional formatting if you want max, 90%, 75%.

For instance, column I contains the max value of each row.

The formula for conditional formatting is =C2=$I2 for max value, nd =C2>0.75*$I2 for values greater than 75% of max value.

enter image description here

  • Related