How to vlookup to compare two lists in separated worksheets?
Supposing, I have two worksheets with a list of names as following screenshots shown, now, I want to compare these two lists and find the matching names in Names-1 if they exit in Names-2. It is painful to do such a comparison manually one by one between two sheets, this article, I will talk about some quick tricks to help you to finish it without effort.
The following formula can help you to extract the names both in Names-1 and Names-2 sheets, please do as this:
1. In Names-1 sheet, select a cell which beside your data, please enter this formula: =VLOOKUP(A2,'Names-2'!$A$2:$A$19,1,FALSE), and press Enter key, if the names in this sheet, it will display the name, if not, an error value will be returned, see screenshot:
2. Then drag the fill handle down to the cells to return the names both in Names-1 and Names-2 sheets, see screenshot:
1. Another formula: =IF(ISNA(VLOOKUP(A2,'Names-2'!$A$2:$A$19,1,FALSE)), "No", "Yes") also can help you to compare the two lists and identify if the names are exit in both sheets, after apply this formula, you can get the following result, and Yes indicates the corresponding name exists in both sheets, and No indicates not exist.
2. In the above formulas: A2 is the first cell of the worksheet that you want to compare, Names-2 is another worksheet name that you want to compare, A2:A19 is the name column to be compared with.
If you have Kutools for Excel, with its Select Same & Different Cells feature, you can quickly compare two lists in separated worksheets and select or highlight the names which are both in these two sheets without any formulas.
After installing Kutools for Excel, please do as follows:
1. Click Kutools > Select > Select Same & Different Cells, see screenshot:
2. In the Select Same & Different Cells dialog box, do the following operations:
(1.) Select the data list in Names-1 sheet under the Find values in, and then select the data from Names-2 sheet under the According to;
(2.) Check Each row from the Based on section;
(3.) Choose Same Values from the Find section;
(4.) Then you can choose background color or font color for the same names which are in both sheets as you need.
3. Then click Ok button, and a prompt box will pop out to remind how many matching cells have been selected, the names which are both in these two worksheets have been selected and highlighted at once, see screenshot:
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 2 years agoHi, I've downloaded the trial version to see if it can solve a challenge i have. I have two rather large worksheets, one an updated version of the other. I ran the comparison 'select same & different' tool. And on the most part it was great. However, it missed a number of differences. Is there limitations on cell/column count?
- To post as a guest, your comment is unpublished.· 3 years agoHello and thank you, the formula above worked extremely well for my needs. I do have one question if I may please.
I have changed your formula slightly to the following =IF(ISNA(VLOOKUP(A62,'Recipients-2'!$D$6:$D$120,1,FALSE)), "0", "1") but what I need to do now is have a total number of times each name appears in the second list. So instead of a 0 or 1 I would like to total the number of times the company name appears in the list.
ABC company is on the list 5 times ABC 5
BCD company is on the list 2 times BCD 2
EFG company is on the list 4 times EFG 4
Can you please advise what I need to add to the formula to enable this to occur, if this is at all possible. Hope I have made sense.
- To post as a guest, your comment is unpublished.· 3 years agoThere is a sub reddit called "Excel"(Search Reddit Excel) and post this there, they are very helpful