In this tutorial, we will show you exactly how to use VLOOKUP to find duplicates in Google Sheets. Simply follow the steps below.
Follow the steps below to find duplicates in Google Sheets using VLOOKUP.
In Google Sheets, arrange your data into two columns. Each column should represent a different category of information. This organization is crucial for accurately comparing your data.
For this example, we will compare the fruits listed in "MARKET A" (in column A) against those in "MARKET B" (in column B). This will help you find duplicates between the two markets.
Label the column next to "MARKET B” as "Duplicates." This column will indicate whether each fruit from "MARKET A" is also found in "MARKET B."
We will start by entering the VLOOKUP formula in the first cell of the "Duplicates" column (C2). The general structure of the VLOOKUP formula is: =VLOOKUP(search_key, range, index, [is_sorted]).
The search key is the value we want to find in the other column, which in this case is the first fruit in "MARKET A" located in cell A2. Start the formula by typing =VLOOKUP(A2, ).
The range is the column where you want to search for the value, which in this case is column B containing the fruits in "MARKET B." After typing =VLOOKUP(A2, you can simply highlight the cells in column B to select the range.
In our example, the formula would be =VLOOKUP(A2, B2:B21, 1, ). The index is set to 1 because we're searching in column B, which is the first column in our range.
Since we want an exact match, set the "is_sorted" parameter to FALSE. This tells the VLOOKUP function to look for an exact match of the search key, so our formula will look like =VLOOKUP(A2, B2:B21, 1, FALSE).
After entering the full formula: =VLOOKUP(A2, B2:B21, 1, FALSE), click Enter. If A2 is not found in "MARKET B," the result will show #N/A.
Press Fn+F4 to change the range to absolute references. This will keep the range constant when we copy the formula to other cells.
Adjust the formula to display blank cells instead of #N/A by using =IFERROR(VLOOKUP(A2, B2:B21, 1, FALSE),""), then press Enter. This will leave the cells blank if some fruit from "MARKET A" is not found in "MARKET B."
Copy the cell with the complete formula =IFERROR(VLOOKUP(A2, B2:B21, 1, FALSE),"") using Ctrl + C, then highlight the remaining cells and press Ctrl + V to paste. This will check all fruits in "MARKET A" for duplicates in "MARKET B."
If a cell contains a fruit name, it means that fruit is also in "MARKET B." On the other hand, a blank cell indicates no duplicates.
We hope that you now have a better understanding of how to use VLOOKUP to find duplicates in Google Sheets. If you enjoyed this article, you might also like our articles on how to make a burndown chart in Google Sheets and how to make a to-do list in Google Sheets.