Author: Oscar Cronquist Article last updated on January 11, 2018

Question: How do I count common cell values in two columns?


Count matching cell values in two columns

Array formula in G12:

=SUM(IF(FREQUENCY(COUNTIF(List2, "<"&List2), COUNTIF(List2, "<"&List2))>0, IF(COUNTIF(List1, List2)>0, 1, 0), "")) + CTRL + SHIFT + ENTER

Array formula in G25:

=SUM(IF(COUNTIF(List1, List2)>0, 1, 0)) + CTRL + SHIFT + ENTER

Array formula in G38:

=SUM(IF(COUNTIF(List2, List1)>0, 1, 0)) + CTRL + SHIFT + ENTER

Named ranges

List1 (B3:B9)
List2 (B7:D9)
What is named ranges?

How to implement array formula to your workbook

Change the named ranges.

Download excel file for this tutorial.

count matching cell values in two columns in excel.xls
(Excel 97-2003 Workbook *.xls)

Functions in this article:

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

Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE

Adds all the numbers in a range of cells

FREQUENCY(data_array, bins_array)
Calculates how often values occur within a range of values and then returns a vertical array of numbers having one more element than Bins_array.