Link to home
Start Free TrialLog in
Avatar of FFNStaff
FFNStaffFlag for United States of America

asked on

How do I set conditional formatting to compare cells in 2 columns in Excel 2010?

Hi,

I am trying to set conditional formatting in column B based on if $B1>$A1 and each corresponding cell down the column.  When I enter this formula, highlighting the amounts in column B, the result is based on comparing to only cell A1, no matter what B cell I'm in.  For example:
A      B
45      90
90      88
78      77
91      95
50      46

The result should have only column B's 90 and 95 formatted.  Not all of B's numbers.  

Appreciate the help!

Pat
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think a possible cause of the error would be if you have a header row in row 1, but your data starts in row 2.  If your formula is =$B1>$A1, but you've highlighted cells B2 on down, you'll get undesirable results (it would be comparing the previous row in each test).

If this is the case, just go to the Manage Rules option under Conditional Formatting and change the formula to $B2>$A2

Regards,
-Glenn

User generated image
Avatar of FFNStaff

ASKER

Thank you Barry!
Glenn, I closed the question before seeing your comment--my apologies.  Thank you for the explanation.  It makes total sense.  Pat
That's okay, Pat.  So long as you got an acceptible answer.  -Glenn