Compare 2 columns
How to compare two lists of data on the Excel worksheets.
xlCompare quickly finds matching and mismatching items in two lists. In Excel you can do this by using VLOOKUP(XLOOKUP) functions. So, in xlCompare we’ve also called this command VLOOKUP.
-
Select Columns, that should be compared. In the example below this is Product Name on the left sheet and PRODUCT_CODE on the right sheet. Click the blue heading icon to mark this column as key.
-
Click the VLOOKUP command on the Ribbon.21310-E1-XL-D is missed in the right worksheet.21310-E1-XL-M is missed in the left worksheet.Orange values in the column B on the right sheet has been updated in comparison with values on the left sheet.
How it works
xlCompare takes value in the right list and looks for it in the left list. If the value is found - all cells in these rows are compared one versus one.
If value was not found - row is highlighted with red color.
If the value from the left list is not present in the right one - it is highlighted with green color.
You are getting the report that shows matching and mismatching values in 2 lists.
Let list is used as dictionary. xlCompare looks for every value in the right list in the dictionary.