How to Use Conditional Formatting to Compare 2 Cells

JARHTMD

Board Regular
Joined
Nov 16, 2009
Messages
57
I'm embarrassed to even ask this question. Anyone with half a brain should be able to do this, but not me.

I've very rarely used conditional formatting, except for something VERY, VERY simple in Excel97. I'm now using Excel2007.

I want to highlight Col-L value with bold red font whenever it does not equal Col-C value.

It doesn't get much simpler than that, but I've gone completely brain dead.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Conditional Formatting makes everyone crazy. Success rests on the proper blend of absolute and relative references.

Select your Column L (or range therein, like L1 to L10). Invoke the Conditional Formatting, New rule, Use a Formula and put this exactly in the box as the rule: =L1<>C1 ,then select desired formatting and click OK until the CondFrmt box goes away.

I hope that does it.

Also, watching this youtube video might illuminate the terrain for you: https://www.youtube.com/watch?v=GRfe4bHsjhI
 
Upvote 0
Thanks a million for your quick reply . . . and especially for the youtube link, which looks like it contains everything I could ever need/want to know about conditional formatting.

I've run into another problem. Col C contains keyed data [2.9, 7.6, 4.3, etc]. Col L contains computed data which is formatted as number with 1 decimal place. Obviously, the computations will almost never exactly match the #.# format.

Example: 2.85123... or 2.9123789... will both display as 2.9, which I want to consider to match 2.9 in Col-C.

How can I use Col L's displayed value (rather than the actual computed value) in the comparison?
 
Upvote 0
You're welcome. Yes, ExcelIsFun on youtube is a tremendous resource...mind-blowing.

You can use one of the functions ROUND, ROUNDUP or ROUNDDOWN on both columns of data; for example, put this in the CondFrmt dialogue box for Use Formula: =round(L1,1)<>round(C1,1)<strike></strike>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,332
Messages
6,124,314
Members
449,153
Latest member
JazzSingerNL

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top