by Allen Wyatt
(last updated January 27, 2016)
Imagine for a moment that you have a worksheet that contains lists of part numbers. On one worksheet you have a list of part numbers, and on another worksheet you have a similar list. The lists are not identical, however, and you want to determine if a particular part number on one list also appears on the other.
One solution is to somehow combine the lists, but add some sort of indicator as to which original list the particular part number came from. This approach (or a variation thereon) is, in fact, the approach taken by many Excel users.
What if you don't want to combine the lists, however? In this case, there is a very easy way to do the comparison. Follow these steps:
When you are done, either TRUE or FALSE will appear to the right of each part number on each worksheet. If TRUE appears, the associated part number appears on the other worksheet. If FALSE appears, then the part number is unique and does not appear on the other worksheet.
Another approach is to use an array formula to do the comparisons. You could follow the same steps shown above, but use the following formula in step 4 (and PartList1 variation in step 6):
Since this is an array formula, you would enter it by using Shift+Ctrl+Enter. The result is the same TRUE and FALSE designation described above.
Regardless of which formula approach you use, you can use the AutoFilter capabilities of Excel to limit what is shown on either worksheet. If you filter to show only the FALSEs, you will have a list of all unique part numbers. If you filter to show TRUEs, then you will have a list of duplicates.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2251) applies to Microsoft Excel 97, 2000, 2002, and 2003.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
When you no longer need a view, you can get rid of it by deleting it. Deleting unnecessary views is a good idea because ...Discover More
When you display the Find tab of the Find and Replace dialog box, you'll notice that any search, by default, will be on ...Discover More
Outline symbols are automatically displayed by Excel when you add subtotals or organize your data using an outline. If ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.