Comparing/Copying Duplicate Data - Help please?

tristanbw

New Member
Joined
Jan 18, 2005
Messages
6
I have one spreadsheet with three tabs: Glossary1, Glossary2, and Duplicates. I would like to compare column A of Glossary1 to column A of Glossary2 and then have any data that is in both Glossary1 and Glossary 2 (duplicate data) copied to column A of the tab called Duplicates.

What formula would work best here and can anyone provide a working example please?

Thanks!
TristanBW
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
in cell A1 of Duplicates

=IF(ISERROR(VLOOKUP(Glossary1!A1,Glossary2!A:A,1,FALSE)),"",(VLOOKUP(Glossary1!A1,Glossary2!A:A,1,FALSE)))

Drag this formula down as many rows as there are in Glossary 1. After you are done you can past the values and then sort the results so that all of the blanks are at the bottom.

Vinman
 
Upvote 0
Thanks for the formula! Also, is there a way to do conditional formatting that would highlight the duplicates in each of the tabs or change the font color? I've seen this formula for use in one column but not across sheets.
 
Upvote 0
The way you need to do that is name the range column A in the duplicates tab. Call it "duplicates". Then in Glossary1 cell a1 use the conditional format function select formula is and insert the this formula =VLOOKUP(A1,duplicates,1,FALSE)=A1. Then select the format you want to use to highlight the duplicates. After you are done you can use the paint brush function to copy the format all the way down column A

Vinman
 
Upvote 0

Forum statistics

Threads
1,214,391
Messages
6,119,249
Members
448,879
Latest member
oksanana

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