Conditional Formatting - Highlighting differing values

JTS25

New Member
Joined
Oct 10, 2019
Messages
31
Hi all,

If I have multiple columns that I'm identifing differences in, and what to highlight those differences. What conditional formatting formula could I use?

Example:

Columns A2 and B2 should be the same, but they are different values. I want to highlight both cells. This rule would be for columns A,B J,K Y,Z
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
1. Select columns A & B.
2. Home>Conditional Formatting>New Rule>Use a formula
3. Formula is: =$A1<>$B1
4. Choose format and click OK
Repeat for J,K and Y,Z.
 
Upvote 0
1. Select columns A & B.
2. Home>Conditional Formatting>New Rule>Use a formula
3. Formula is: =$A1<>$B1
4. Choose format and click OK
Repeat for J,K and Y,Z.

Thanks JoeMo!

If I'm going to use the same color to highlight all unique values, and there are around 1,000 rows per column. Could I write a single formula to capture everything? Or do I need to create a separate rule for each?
 
Upvote 0
Thanks JoeMo!

If I'm going to use the same color to highlight all unique values, and there are around 1,000 rows per column. Could I write a single formula to capture everything? Or do I need to create a separate rule for each?
You are welcome - thanks for the reply.

The formula must be specific to the pair of columns so I think you need a separate rule for each pair of columns.
 
Upvote 0
1. Select columns A & B.
2. Home>Conditional Formatting>New Rule>Use a formula
3. Formula is: =$A1<>$B1
4. Choose format and click OK
Repeat for J,K and Y,Z.

Joe,
When entering this conditional format =$A1<>$B1 --> Format (Yellow)-->OK, both of the columns where highlighted but they are the same value. Any ideas on what went wrong?

Values could currency, numbers, words
 
Upvote 0
Joe,
When entering this conditional format =$A1<>$B1 --> Format (Yellow)-->OK, both of the columns where highlighted but they are the same value. Any ideas on what went wrong?

Values could currency, numbers, words
If those values are floating point numbers, they could differ even though they look alike because your formatting truncates their visual appearance. Excel takes floating point numbers out to a precision of fifteen digits so 1.0000000000001 and 1.0000000000000 are different even though formatted to say 5 decimal places (1.00000) they appear to be identical.

In the case of text, be sure there are no extrat spaces in one cell entry when compared to the other. A simple test is to use: =LEN($A1)=LEN($B1) which should return TRUE if they are the same. Alternatively, =EXACT($A1,$B1) can be used to test.
 
Upvote 0
If those values are floating point numbers, they could differ even though they look alike because your formatting truncates their visual appearance. Excel takes floating point numbers out to a precision of fifteen digits so 1.0000000000001 and 1.0000000000000 are different even though formatted to say 5 decimal places (1.00000) they appear to be identical.
That situation can be rectified by using the ROUND formula on each value, i.e.
Code:
=ROUND($A1,2)<>ROUND($B1,2)
 
Upvote 0
If those values are floating point numbers, they could differ even though they look alike because your formatting truncates their visual appearance. Excel takes floating point numbers out to a precision of fifteen digits so 1.0000000000001 and 1.0000000000000 are different even though formatted to say 5 decimal places (1.00000) they appear to be identical.

In the case of text, be sure there are no extrat spaces in one cell entry when compared to the other. A simple test is to use: =LEN($A1)=LEN($B1) which should return TRUE if they are the same. Alternatively, =EXACT($A1,$B1) can be used to test.
Thank you!
 
Upvote 0

Forum statistics

Threads
1,224,763
Messages
6,180,825
Members
452,997
Latest member
gimamabe71

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