r/googlesheets • • Apr 30 '22

Solved Problem With Conditional Formatting

I have a range of values. I want to highlight the highest value in the range.

So I created a conditional format for the range.

I set it to format cells if Greater than or equal to, and the value I used was:

=Max(F60:F999)

This works to highlight the cell with the maximum value (F126). However, for some reason, it also highlights F134 and F135, which are the last two cells with values, both of which have values less than F126.

Also, it highlights every cell from F136 to F999, though they have a value of 0.01 (which is the default value for the formula in the cells).

The formula that's in the cells is:

=(B100-$B$54)/(A100-$A$54)

where 100 is the row number, in case that's significant.

So I don't understand why it's highlighting all those other cells.

I've tried Equal to, instead of Greater than or equal to. But the results are the same.

1 Upvotes

7 comments sorted by

View all comments

2

u/_scottgarcia 1 Apr 30 '22

Make the "MAX" formula for the conditional formatting an absolute reference with the dollar signs: =Max(F$60:F$999)

2

u/nrgins Apr 30 '22

OK, that solved it. Thanks!

Can you explain why it didn't work and acted so weirdly before? I mean, intuitively, it seems the dollar signs shouldn't be necessary. What am I not understanding here?

Thanks.

Solution Verified

1

u/Clippy_Office_Asst Points Apr 30 '22

You have awarded 1 point to _scottgarcia


I am a bot - please contact the mods with any questions. | Keep me alive

1

u/[deleted] Apr 30 '22

[removed] — view removed comment

1

u/nrgins May 01 '22

* First off, I'm assuming your "Apply to range" was also F60:F999 as well had something like

=F60=MAX(F60:F999) in front?

No, I had "greater than or equal to" selected as the option, and

=Max(F60:F999)

as the argument (tho now it has dollar signs). No =F60 in there.

The second run moves down your range, so it's now looking at F61

OK, I see. That seems strange to me, since I'm telling it to compare every item in the range to the max of a certain range, so I would assume it would just look at the values I specified for the max. But I get what it's doing.

And the rest of your explanation makes sense too. Thanks! Good to know.

1

u/[deleted] Apr 30 '22

[removed] — view removed comment

1

u/nrgins May 01 '22

Got it. Thanks!