Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-09-30
5
Medium Priority
?
188 Views
Last Modified: 2014-09-30
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
0
Comment
Question by:FFNStaff
  • 2
  • 2
5 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 2000 total points
ID: 40352996
Hello Pat

I selected column B and then applied conditional formatting with that formula (see attached). It seems to work as expected

regards, barry
conditional-formatting.xlsx
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40353014
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

reference issues
0
 

Author Closing Comment

by:FFNStaff
ID: 40353079
Thank you Barry!
0
 

Author Comment

by:FFNStaff
ID: 40353086
Glenn, I closed the question before seeing your comment--my apologies.  Thank you for the explanation.  It makes total sense.  Pat
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40353113
That's okay, Pat.  So long as you got an acceptible answer.  -Glenn
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question