Last Updated on November 18, 2021 by Jake Sheridan
In this tutorial, you will learn how to count cells in Google Sheets.
There are several different functions in Google Sheets for quickly counting cells that meet a given criteria. Whether you want to count all cells in a range regardless of content, count non-black cells or count cells that meet certain criteria, this tutorial will step you through the process.
Count All Cells
There’s no single function to count all cells in a range regardless of content, but it’s still quite simple to create a formula that does this.
The two functions needed to calculate the total number of cells in a range are the ROW() function and the COLUMNS() function. These two functions respectively output the number of rows and columns in the input range. By multiplying them together, we get the total number of cells
Enter the following formula to calculate the cell count: “=ROWS(A2:D15)*COLUMNS(A2:D15)”, where A2:D15 is the range you want to count cells in
The cell count will display
Count Non-Blank Cells
If you want to count only cells in the range that are not empty, here’s how:
Select a cell and enter the following formula: “=COUNTA(A2:D15)”. The COUNTA function counts all cells in the range that contain values of any kind
Hit enter to finish the formula. The COUNTA function counts all cells in the range that contain values of any kind, including numbers and text
Count Specific Cells
If you want to count cells that meet more specific criteria, you can use the COUNTIF function to specify exactly which cells should be included in the count. In this example, we’ll count only cells that contain the word “Approved”.
Select a cell and type the following formula: “=COUNTIF(A2:D15,”Approved”)”. The first input of the COUNTIF function is the range to count in, and the second is the criteria used to determine which cells to count. In this case, the text “Approved” is used to count only cells containing this exact string
You can also use COUNTIF with numerical criteria. For example, you could match only numbers greater than 20 with this formula: “=COUNTIF(A2:D15,”>20″)”
Example Spreadsheet: Make a copy of the example spreadsheet
In this tutorial, I covered how to count cells in Google Sheets. Want more? Check out all the Google Sheets Tutorials.