{"id":429,"date":"2016-10-14T15:37:05","date_gmt":"2016-10-14T19:37:05","guid":{"rendered":"http:\/\/techdeskguru.com\/?p=429"},"modified":"2016-10-14T15:37:05","modified_gmt":"2016-10-14T19:37:05","slug":"how-to-compare-two-lists-in-different-worksheets-in-excel-to-locate-any-duplicates","status":"publish","type":"post","link":"http:\/\/techdeskguru.com\/?p=429","title":{"rendered":"How to: Compare two lists in different worksheets in Excel to locate any duplicates"},"content":{"rendered":"<p>Without VBA&#8230;<\/p>\n<p>If you can use a helper column, you can use the <code>MATCH<\/code> function to test if a value in one column exists in another column (or in another column on another worksheet). It will return an Error if there is no match<\/p>\n<p><strong>To simply identify duplicates, use a helper column<\/strong><\/p>\n<p>Assume data in Sheet1, Column A, and another list in Sheet2, Column A. In your helper column, row 1, place the following formula:<\/p>\n<p><code>=If(IsError(Match(A1, 'Sheet2'!A:A,False)),\"\",\"Duplicate\")<\/code><\/p>\n<p>Drag\/copy this forumla down, and it should identify the duplicates.<\/p>\n<p><strong>To highlight cells, use conditional formatting:<\/strong><\/p>\n<p>With some tinkering, you can use this <code>MATCH<\/code> function in a Conditional Formatting rule which would highlight duplicate values. I would probably do this <em>instead<\/em> of using a helper column, although the helper column is a great way to &#8220;see&#8221; results before you make the conditional formatting rule.<\/p>\n<p>Something like:<\/p>\n<p><code>=NOT(ISERROR(MATCH(A1, 'Sheet2'!A:A,FALSE)))<\/code><\/p>\n<p><a href=\"http:\/\/techdeskguru.com\/wp-content\/uploads\/2016\/10\/Remove_Excel_Duplicates.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-430\" src=\"http:\/\/techdeskguru.com\/wp-content\/uploads\/2016\/10\/Remove_Excel_Duplicates-300x200.jpg\" alt=\"remove_excel_duplicates\" width=\"300\" height=\"200\" srcset=\"http:\/\/techdeskguru.com\/wp-content\/uploads\/2016\/10\/Remove_Excel_Duplicates-300x200.jpg 300w, http:\/\/techdeskguru.com\/wp-content\/uploads\/2016\/10\/Remove_Excel_Duplicates-624x416.jpg 624w, http:\/\/techdeskguru.com\/wp-content\/uploads\/2016\/10\/Remove_Excel_Duplicates.jpg 627w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>For Excel 2007 and prior, you cannot use conditional formatting rules that reference other worksheets. In this case, use the helper column and set your formatting rule in column A like:<\/p>\n<p><code>=B1=\"Duplicate\"<\/code><\/p>\n<p>This screenshot is from the 2010 UI, but the same rule should work in 2007\/2003 Excel.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/techdeskguru.com\/wp-content\/uploads\/2016\/10\/Remove_Excel_Duplicates2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-431\" src=\"http:\/\/techdeskguru.com\/wp-content\/uploads\/2016\/10\/Remove_Excel_Duplicates2-300x136.jpg\" alt=\"remove_excel_duplicates2\" width=\"300\" height=\"136\" srcset=\"http:\/\/techdeskguru.com\/wp-content\/uploads\/2016\/10\/Remove_Excel_Duplicates2-300x136.jpg 300w, http:\/\/techdeskguru.com\/wp-content\/uploads\/2016\/10\/Remove_Excel_Duplicates2.jpg 598w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Without VBA&#8230; If you can use a helper column, you can use the MATCH function to test if a value in one column exists in another column (or in another &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-429","post","type-post","status-publish","format-standard","hentry","category-microsoft-excel"],"_links":{"self":[{"href":"http:\/\/techdeskguru.com\/index.php?rest_route=\/wp\/v2\/posts\/429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/techdeskguru.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/techdeskguru.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/techdeskguru.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/techdeskguru.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=429"}],"version-history":[{"count":1,"href":"http:\/\/techdeskguru.com\/index.php?rest_route=\/wp\/v2\/posts\/429\/revisions"}],"predecessor-version":[{"id":432,"href":"http:\/\/techdeskguru.com\/index.php?rest_route=\/wp\/v2\/posts\/429\/revisions\/432"}],"wp:attachment":[{"href":"http:\/\/techdeskguru.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/techdeskguru.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=429"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/techdeskguru.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}