Reputation: 567
Consider the following data -
I want to compare every other row with the one below and colorize the cells if the value is greater as shown in the image.
If at all the data is sorted on some column, the colored cells should remain as they were initially. For example, the comparison should be between values A
and B
in COL1
for the same value ALPHA
in COL2
.
Can this be achieved by writing a formula and how it would look like? Thanks SO.
Upvotes: 0
Views: 507
Reputation: 53126
Conditional Formatting formula, applied to C2 (select C2 when creating the CF rule
=AND(MOD(ROW(), 2)=0, C2>OFFSET(C2,1,0))
Apply to your data block
Upvotes: 2