How can I count names in Google Sheets?

Counting names in Google Sheets is a simple and efficient process that allows users to easily keep track of the number of names in their data. By using the built-in COUNTA function, users can quickly count the number of cells that contain text, including names, in a specific range or across the entire sheet. This function eliminates the need for manual counting and can be applied to any column or row containing names. Additionally, Google Sheets also offers the option to filter and sort data, providing further organization and accuracy when counting names. Overall, the ability to count names in Google Sheets is a valuable tool for data management and analysis.

Count Names in Google Sheets (3 Examples)


You can use the following formulas to count names in Google Sheets:

Formula 1: Count Cells with Exact Name

=COUNTIF(A2:A11, "Bob Johnson")

Formula 2: Count Cells with Partial Name

=COUNTIF(A2:A11, "*Johnson*")

Formula 3: Count Cells with One of Several Names

=COUNTIF(A2:A11, "*Johnson*") + COUNTIF(A2:A11, "*Smith*")

The following examples show how to use each formula with the following dataset in Google Sheets:

Example 1: Count Cells with Exact Name

We can use the following formula to count the number of cells in column A that contain the exact name “Bob Johnson”:

=COUNTIF(A2:A11, "Bob Johnson")

The following screenshot shows how to use this formula in practice:

Google Sheets count specific name

We can see that there are 2 cells that contain “Bob Johnson” as the exact name.

Example 2: Count Cells with Partial Name

We can use the following formula to count the number of cells in column A that contain “Johnson” anywhere in the name:

=COUNTIF(A2:A11, "*Johnson*")

The following screenshot shows how to use this formula in practice:

Google Sheets count cells with partial name

We can see that there are 4 cells that contain “Johnson” somewhere in the name.

We can confirm this is correct by manually identifying each name in the Employee column that contains “Johnson” somewhere in the name:

  • Bob Johnson
  • Mike Johnson
  • Arthur Johnson
  • Bob Johnson

There are indeed four employees with “Johnson” somewhere in their name.

Example 3: Count Cells with One of Several Names

We can use the following formula to count the number of cells in column A that contain “Johnson” or “Smith” somewhere in the name:

=COUNTIF(A2:A11, "*Johnson*") + COUNTIF(A2:A11, "*Smith*")

The following screenshot shows how to use this formula in practice:

Google Sheets count cells with one of several names

We can see that there are 6 cells that contain either “Johnson” or “Smith” somewhere in the name.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

x