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

Answer:

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:

COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition

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

SUM(number1,[number2],)
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.

  • Share/Bookmark

Related posts:

  1. Count unique values in two lists combined in excel
  2. Count matching values in one or more columns in excel
  3. Count unique distinct values within same week, month or year in excel
  4. Count unique distinct values using date criteria in a range in excel
  5. Count unique distinct text values in a range in excel
  6. How to count unique distinct occurrences for each date in excel
  7. Count unique records by date in excel
  8. Count unique distinct numbers across multiple sheets (3D range) in excel
  9. Merge two columns with possible blank cells in excel (formula)
  10. Count unique text values in a range containing both numerical and text values