Reputation: 467
As of now, I would like to compare a range of values (different rows but same cells) and highlight them according to the result.
Let's say that we have Row A with some numbers and Row B also with numbers.
A B
10 5
20 30
30 40
I would like to use conditional formatting to highlight cells in Row B if they are greater than in Row A. Like iterate through each of them, compare A1 < B1 (A2 < B2.. A"X" < B"X") and highlight each of them if the cell is greater.
Could you support me on this? Thanks in advance!
Upvotes: 0
Views: 1603
Reputation: 2881
In order to do that
Go to Format > Conditional formatting > format cell if... and Choose Custom formula. and Paste this formula in "Value or Formula". take a look at the Example Sheet.
=IF(A2:A="",,B2:B>A2:A)
Explanation
IF
Range A2:A
is Empty ""
Do nothing ,,
if isn't Empty check if B2:B > A2:A
if TRUE Highlight green if FALSE do nothing.
Upvotes: 1
Reputation: 10573
You can use in Custom formula is
=B1>A1
OR (to take into account empty cells in column A
)
=AND(B1>A1,A1<>"")
Upvotes: 0