color cells based on nocompares

tcurrier

Board Regular
Joined
Apr 27, 2006
Messages
175
I have a spreadsheet with columns of numbers, where I'd like to color all of the cells in columns a1 - a20 that don't match their corresponding numbers in columns d1 - d20. For example, if a5 doesn't match d5, I want to change the color of both cells to yellow.

Can anyone suggest an easy way to do this ?

Thanks....
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,454
Hello tcurrier,
You can use Conditional Formatting for this.
In A1, go to Format > Conditional formatting.
For the first field use 'Cell value is'
In the second field choose 'not equal to'
In the third field enter this: =$D1
Click the Format button > Patterns tab and choose the desired color.
Click OK, OK.
Copy A1 and paste to A2:A20.

For column D, simply repeat the process using =$A1 in the third field instead of =$D1.

You should be good to go.
 

Forum statistics

Threads
1,137,330
Messages
5,680,857
Members
419,936
Latest member
rphill48

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
Top