Highlighting Cells when equal to each other

n18

New Member
Joined
Apr 14, 2011
Messages
17
Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I have 2 columns in my excel sheet, what I want to do is that if they are equal to each other to highlight them green and if they are not equal to each other to highlight them red, there will also be blank cells, where there is blank cells in either row I don't want to highlight them, for example my sheet looks something like this

ID1 ID2
2
3 3
3 4
5

Can you do this using conditional formatting or is it better to write a simple Macro?

Thanks
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi,

Conditional Formatting will do this for you:

Cell Value Is: equal to,, =A2 - Green
Cell Value Is: not equal to,, =A2 - Red
 
Upvote 0
Thanks James, how would I apply this to all the rows in my sheet? I have a few thousand, there will be blank rows in between also. If I try and drag the formula from cell to cell it will point back to cell B2 in this case, Is it possible to apply the conditional formatting rules to the entire column and not specific cells?

Thanks again
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,304
Members
452,904
Latest member
CodeMasterX

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