Counting matches with COUNTIF

1 / 5

COUNTIF counts the cells that match something. How many people are in each team?

keyboard Typing formulas is easiest on a computer with a keyboard.

A1
ABCDEFG
1NameTeamSalesTeamPeople
2TariqWest600North
3NadiaWest800South
4DanielNorth290East
5QuinnSouth900West
6JamalNorth680
7IslaEast420
8KofiWest340
9YusufNorth640
10SamSouth870
11RosaWest840
12
13
14
15
teams
how many?
Type to enter a value or a formula starting with =. F2 edits, F4 adds $ to a reference.
Study notes

How COUNTIF works

  • What does COUNTIF do?

    COUNTIF counts the cells that match something:

    =COUNTIF(where to look, what to count)

  • How do you count a word or a cell?

    • =COUNTIF(B2:B11,"North") counts the cells in B2:B11 that say North.
    • =COUNTIF(B2:B11,E2) counts the cells that match whatever is in E2. Change E2 and the count changes too.
  • Does COUNTIF care about capitals?

    No. It ignores upper and lower case: "north" counts as North.

  • How do you count numbers above a value?

    Put the comparison in quotes: =COUNTIF(C2:C11,">=500") counts sales of 500 or more.

Know someone fighting with a spreadsheet? Send them this page.