## Filter common values from three columns

*Article updated on March 13, 2018*

**Question:** How do I filter values that exists in all three columns?

**Answer:**

Formula in A14:

copied down as far as necessary.

**Named ranges**

List1 (A2:A11)

List2 (B2:B10)

List3 (C2:C11)

What is named ranges?

Download excel example file.

Common values in three columns.xls

(Excel 97-2003 Workbook *.xls)

**Functions in this article:**

**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

**MATCH(**lookup_value;lookup_array; [match_type]

Returns the relative position of an item in an array that matches a specified value

**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

**COUNTIF(**range,criteria**)**

Counts the number of cells within a range that meet the given condition

Compare values between two columns and filter values existing in only one column

There are text values in column A and column B. The question is how do you compare the values in […]### 6 Responses to “Filter common values from three columns”

### Leave a Reply

**How to add a formula to your comment:**

<code>your formula</code>

Remember to convert less than and larger than signs to html character entities before you post your comment.

**How to add VBA code to your comment:**

[vb 1="vbnet" language=","]

VBA code

[/vb]

**How to add a picture to your comment:**

Upload picture to postimage.org

Add picture link to comment.

**Contact Oscar**

You can contact me through this webpage

Hello,

I am not certain why the range of $A$13:A13 is used in the countif function... Is this a mistake?

Also, how can I adjust this to check for common values in 15 columns? Is that even possible?

Thanks,

Beth

Beth,

I am not certain why the range of $A$13:A13 is used in the countif function... Is this a mistake?It makes sure that only unique distinct values are extracted.

See the explanation in this post:

Filter values that exists in all three lists

Also, how can I adjust this to check for common values in 15 columns? Is that even possible?Yes, add the remaining 12 columns to the formula, using a countif function for each column. See explanation.

Hi Oscar,

Is there a way to do what you did above but without the named ranges?

Thanks

Dan

How can we find common numbers from different sheets and arrange them with column heading and by counting that how many time a found in which Sheet???

REGARDING THE ABOVE QUESTION "Also, how can I adjust this to check for common values in 15 columns? Is that even possible?

Yes, add the remaining 12 columns to the formula, using a countif function for each column. See explanation."

Can you tell me what to insert - for my 3 columns I have =INDEX(A2:A16, MATCH(0, COUNTIF($A$19:A19, A2:A16)+IF(IF(COUNTIF(B2:B16, A2:A16)>0, 1, 0)+IF(COUNTIF(C2:C16, A2:A16)>0, 1, 0)=2, 0, 1), 0)). How do I add further columns into the range? I have tried copy and pasting +IF(COUNTIF(C2:C16, A2:A16)>0, 1, 0)before the = and changing it to d2:d16 but get an error

Louise

Great question!

Array formula in cell B14:

To add a fifth column (Col E) simply add a COUNTIF function.