Exceljet

Quick, clean, and to the point

Count items in list

Excel formula: Count items in list
Generic formula 
=COUNTIFS(A:A,A1,B:B,B1)
Explanation 

To create a count of the values that appear in in a list or table, you can use the COUNTIFS function. In the example shown, the formula in D5 is:

=COUNTIFS(B:B,B5,C:C,C5)

How this formula works

The COUNTIFS function takes range/criteria pairs, and delivers a count when all criteria match. This example, contains two range/criteria pairs.

In pair 1, the range is B:B (entered as a full column reference) and the criteria is B5. By itself, this pair would return a count of every value in column B.

In pair 2, the range is C:C, and the criteria is C5. By itself, this pair would return a count of every value in column C.

Because both pairs appear in the same COUNTIFs function, they link the values in column B with those in column C, and COUNTIFS generates a count of each B/C combination that appears in the table.

Author 
Dave Bruns

Excel Formula Training

Formulas are the key to getting work done in Excel. In this accelerated video course, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn powerful skills to troubleshoot, trace errors, and fix problems. This is the formula training you should have had to begin with. See details here.

I love your articles. They're the cleanest, most efficient place to get Excel knowledge. - Sebastian
Excel foundational video course
Excel Pivot Table video training course
Excel conditional formatting video course
Excel formulas and functions video training course
Excel Shortcuts Video Course