Forum Discussion
Manzi69
May 05, 2022Copper Contributor
Conditional Formatting- Greater than multiple cells
Hello, Im trying to conditionally format cells that are greater than either values from 2 other cells: I want to colour any of the white shaded cells in the same row that are greater than ...
- May 05, 2022a custom formula in conditional formatting will apply the formula to the top left most cell in the 'Applied to' range and then move to each other cell in the range and adjust the formula relative to that next cell location. So lets pretend the gray columns are A:B and you highlight columns C:I and create new rule. Then Enter:
=ISNUMBER(C1)*((C1>$A1)+(C1>$B1))
So C1 is the top left corner of the range so If C1 is a number AND > either A1 or B1 it is true
Then when excel looks at D1 it replaces each C1 with D1 in the formula but the $ before the A and the B tell it to Lock them and not change. And similar when it goes to row 2 all the 1s become 2s.
mtarler
May 05, 2022Silver Contributor
a custom formula in conditional formatting will apply the formula to the top left most cell in the 'Applied to' range and then move to each other cell in the range and adjust the formula relative to that next cell location. So lets pretend the gray columns are A:B and you highlight columns C:I and create new rule. Then Enter:
=ISNUMBER(C1)*((C1>$A1)+(C1>$B1))
So C1 is the top left corner of the range so If C1 is a number AND > either A1 or B1 it is true
Then when excel looks at D1 it replaces each C1 with D1 in the formula but the $ before the A and the B tell it to Lock them and not change. And similar when it goes to row 2 all the 1s become 2s.
=ISNUMBER(C1)*((C1>$A1)+(C1>$B1))
So C1 is the top left corner of the range so If C1 is a number AND > either A1 or B1 it is true
Then when excel looks at D1 it replaces each C1 with D1 in the formula but the $ before the A and the B tell it to Lock them and not change. And similar when it goes to row 2 all the 1s become 2s.