How to check or find if value exists in another column?
Supposing, I have two columns of data which contains some duplicate values in these both columns as left screenshot shown. And now, I want to find if the values in Column A also exists in Column C. To compare them one by one is not a good method, here, I can talk about some handy tricks for solving this problem in Excel.
To check if the values are in another column in Excel, you can apply the following formula to deal with this job.
1. First, you can copy the two columns of data and paste them into column A and Column C separately in a new worksheet, leave Column B blank to put the following formula.
2. Enter this formula: =IF(ISERROR(VLOOKUP(A4,$C$4:$C$14, 1, FALSE)),"Not Exist","Exist" ) into cell B2, and press Enter key, see screenshot:
Note: in the above formula, A4 is the cell of the first column that you want to check if it is in another column, and $C$4:$C$14 is the column that you want to be compared with.
3. Then select cell B4, and drag the fill handle over to the cells that you need to apply this formula, you will get the following result, Exist stands for the value in List A exists in List B as well, and Not Exist indicates the value is not in List B.
Kutools for Excel's Select Same & Different Cells feature can help you to select and highlight the same and different cell values between two columns as you need. Click to download Kutools for Excel!
In Excel, you can also highlight the duplicate values in one column when they found in another column by using the Conditional Formatting. Please do as this:
1. Select the cells in List A that you want to highlight the cells where the values exit in List B as well.
2. Then click Home > Conditional Formatting > New Rule, in the New Formatting Rule dialog box, please click Use a formula to determine which cells to format from the Select a Rule Type section, and then enter this formula =MATCH(A4,$C$4:$C$14,0) into the Format values where this formula is true text box, see screenshot:
3. Then click Format button to go to the Format Cells dialog box, and choose one color you like under the Fill tab, see screenshot:
4. Then click OK > OK to close the dialogs, and now, you can see the values both in List A and in List B are highlighted from List A, see screenshot:
With Kutools for Excel’s Select Same & Different Cells feature, we can quickly select or shade the duplicates or differences in the two columns. This will be help for you to find the duplicate or unique values at a glance.
|Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.|
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, please do the following operations:
A: Click button from the Find values in: (Range A) section to select the column of data that you want to compare with another column. And click button under According to: (Range B) section to select the cells that you want to be compared with.
B: Select Each row under the Based on section.
C: Specify Same Values from the Find section.
D: You can fill background color or font color for the same values you need under the Processing of results section, please choose the color you like.
3. After finishing the settings, then click Ok button, all the values in both Column A and Column C are shaded in the Column A as following screenshot shown:
Note: If you want to fill the same values in Column C, you just need to exchange the Find values in column data and According to column in the dialog box, and you will get the following results:
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 days agoThis was really helpful for me. Thanks!
- To post as a guest, your comment is unpublished.· 4 months agowhat if you want to know "where" the data is in the other list, not just that the data exists in the other list?
- To post as a guest, your comment is unpublished.· 6 months agoBloody Brilliant work, thanks a lot.
- To post as a guest, your comment is unpublished.· 1 years agoThank you for saving my time
- To post as a guest, your comment is unpublished.· 2 years agoThis Guide is really AWESOME - a little too much GIF sparkles (using old firefox)
- To post as a guest, your comment is unpublished.· 2 years agoThanks. It helped me in a great way.
- To post as a guest, your comment is unpublished.· 2 years agoThat's new! Awesome!