How to find common values from two lists
Question: How can I compare two columns to find common values?

Array formula in C2:
Copy cell C2 and paste it down as far as needed.

Download excel sample file for this tutorial.
common-values.xls
(Excel 97-2003 Workbook *.xls)
How do i remove the cell errors in the sheet above:
How do i remove errors from a cell formula?
Recommended blog posts
Compare two lists of data: Filter common row records in excel
INDEX(array,row_num,[column_num])
Returns a value or reference of the cell at the intersection of a particular row and column, in a given range
SMALL(array, k)
Returns the k-th smallest number in this data set.
ROW(reference)
Returns the row number of a reference
MATCH(lookup_value;lookup_array; [match_type])
Returns the relative position of an item in an array that matches a specified value
IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE
COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition
This blog article is one out of five articles on the same subject.
- Filter values existing in range 1 but not in range 2 using array formula in excel
- Filter common values between two ranges using array formula in excel
- How to remove common values between two columns
- How to find common values from two lists
- Highlight common values in two lists using conditional formatting in excel







April 22nd, 2009 at 8:23 pm
If you need to expand your comparison you will need to highlight all the rows, in the column, where you want the common values stored. Paste the above equation into the formula box, may need to use F2 button, and change the values of 17 to however many rows you need. The "" portion of the equation will need retyped as "". Use CTRL + SHFT + ENTER to run comparison. This is due to the equation using an array. Good Luck
April 23rd, 2009 at 8:41 pm
Thank you for your comment. I have edited the article.
March 28th, 2012 at 6:36 pm
hi oscar,
i have a small problem which is similar to the one you have illustrated above, with the only difference being that i have some duplicates within List1 and List2 themselves.
eg. GG is repeated twice in List1, HH is repeated thrice in List2.
when i use this formula, i get duplicate GG and HH in Column 3. is there a way to prevent them from appearing? i tried a mishmash of this formula and a couple of others that i learnt on your website (ones listed in Duplicate category), but to no avail.
please help me out; i will appreciate that very much.
much thanks and kind regards.
March 30th, 2012 at 8:39 am
K. Yantri,
Use this array formula in cell C2:
April 26th, 2012 at 4:44 am
hi oscar,
thank you for your kind help in this regard.