{"id":12114,"date":"2012-01-04T07:58:05","date_gmt":"2012-01-04T07:58:05","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=1144"},"modified":"2022-08-07T00:53:26","modified_gmt":"2022-08-07T00:53:26","slug":"how-to-compare-two-columns-in-excel-to-find-duplicates","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2012\/01\/how-to-compare-two-columns-in-excel-to-find-duplicates\/","title":{"rendered":"How to compare two columns in Excel to find duplicates"},"content":{"rendered":"
Many times we require to compare two columns’ data and find out all the Duplicates. So in this article, you are going to see how we can compare two columns in Excel and find out duplicates.<\/p>\n
There are two ways of comparing two columns in an Excel Worksheet.<\/p>\n
1.<\/strong>By Using Excel Formula By using ISERROR<\/strong> and MATCH<\/strong> formula we can compare 2 columns. Where:<\/strong>
\n2.<\/strong> By Using Excel Macro<\/p>\nCompare two columns by using Excel Formulas:<\/h3>\n
\nType the below formula in the column where you want the list of all duplicates in both the column<\/p>\n=IF(ISERROR(MATCH(A1,$C$1:$C$5,0)),\"\",A1) <\/code><\/pre>\n
\nA1 –<\/strong> Is the column Which you want to be compared
\n$C$1:$C$5 –<\/strong> Is the Range which you want compared with<\/p>\n