2.4 C
London
Friday, December 20, 2024
HomeSoftware TutorialsExcelExcel: How to Find Duplicates Using VLOOKUP

Excel: How to Find Duplicates Using VLOOKUP

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following VLOOKUP formula in Excel to find values in one column that are duplicates of values in another column:

=VLOOKUP(B2, $A$2:$A$8, 1, FALSE)

This particular formula looks up the value in cell B2 in the range A2:A8 and returns B2 if it is found. Otherwise, #N/A is returned.

The following example shows how to use this formula in practice.

Example: Find Duplicates Using VLOOKUP in Excel

Suppose we have the following dataset in Excel that shows the names of various fruits sold by a store during two consecutive weeks:

Now suppose we would like to use a VLOOKUP function to find the names of the fruits in the Week 2 column that are duplicates of a name in the Week 1 column.

To do so, we can type the following formula into cell C2:

=VLOOKUP(B2, $A$2:$A$8, 1, FALSE)

We can then drag and fill this formula down to the remaining cells in column C:

If the name of the fruit appears in column C, then it is a duplicate.

For example:

  • Pears is a duplicate.
  • Peaches is not a duplicate.
  • Kiwis is a duplicate.
  • Bananas is a duplicate.

And so on.

Note that we could also use the following VLOOKUP formula to return specific values that indicate whether or not each fruit is a duplicate:

=IF(ISNA(VLOOKUP(B2,$A$2:$A$8,1,FALSE)),"Not a Duplicate","Duplicate")

We’ll type this formula into cell C2 and then drag and fill it down to each remaining cell in column C:

From the output we can see:

  • Pears is a duplicate.
  • Peaches is not a duplicate.
  • Kiwis is a duplicate.
  • Bananas is a duplicate.

And so on.

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

Excel: How to Use VLOOKUP to Return Multiple Columns
Excel: How to Use VLOOKUP to Return All Matches
Excel: How to Compare Two Lists Using VLOOKUP

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories