Compare contents of 2 columns to find duplicates

Sais41

New Member
Joined
May 27, 2011
Messages
3
I'm using Excel 2003 and have a very long (in terms of number of rows) spreadsheet which has 2 stock code columns. How do I compare the contents of both columns and highlight any duplicates?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Have you tried conditional formatting? I am in 2007, but thought that was an easy option in 2003
Thanks for your reply Steve=True. Yeah, I know how to do that to find duplicates within a single column using conditional formating, but I need to know if there are duplicates say in Column A and Column F. That's what I don't know how to do.
 
Upvote 0
Welcome to the MrExcel board!

See if this is what you want.

1. Select A2:A?? and apply the CF shown for A2 (adjust the range in the CF formula if required)

2. Select F2:F?? and apply the CF shown for F2 (adjust the range in the CF formula if required)

Excel Workbook
ABCDEF
1List 1List 2
2ab
3by
4cf
5dx
6ea
7fz
8gh
9
CF Duplicates
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A21. / Formula is =COUNTIF($F$2:$F$100,A2)Abc
F21. / Formula is =COUNTIF($A$2:$A$100,F2)Abc
 
Upvote 0
Sorry, had to go to another part of the country and only able to reply today. This worked exactly as I'd hoped! Many thanks Peter_SSs.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,736
Members
452,940
Latest member
Lawrenceiow

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