Count in Sheets: Google Sheets COUNT Function Guide

How-to basics · Updated November 23, 2026

Yes, you can count in Google Sheets using the COUNT function, which counts numeric cells, and related functions like COUNTA for non-empty cells, COUNTIF for cells meeting a condition, and COUNTIFS for multiple conditions. The simplest form is =COUNT(A1:A10), which returns the number of cells in that range containing numbers.

What Exactly Does COUNT Do?

The COUNT function in Google Sheets counts only cells that contain numbers—not text, not blanks, not errors, and not logical values like TRUE/FALSE. For example, if you have a list of sales figures in cells A1 through A10, =COUNT(A1:A10) will tell you how many of those cells actually have a numeric value. If some cells contain text labels like “N/A” or are empty, they are ignored.

This is different from COUNTA, which counts any cell that is not empty, including text, numbers, and even errors. So if you need to know how many entries exist regardless of type, use COUNTA. If you only care about numeric data, use COUNT.

How to Use COUNT in Google Sheets

Using COUNT is straightforward. Click on an empty cell where you want the result to appear, type the formula, and press Enter. The syntax is:

=COUNT(value1, [value2, ...])

Here, value1 can be a range like A1:A10, or individual cells like A1, B2, C3. You can also mix ranges and individual cells. For example, =COUNT(A1:A10, C1, D1:D5) counts all numeric cells across those ranges and the single cell.

You can also use COUNT with other functions. For instance, to count how many numbers are greater than 50 in a range, you could use =COUNTIF(A1:A10, ">50"). Or to count numbers between 10 and 20, use =COUNTIFS(A1:A10, ">=10", A1:A10, "<=20").

COUNT vs. COUNTA vs. COUNTIF

These three functions are often confused, but they serve different purposes:

  • COUNT – Counts only numeric cells.
  • COUNTA – Counts all non-empty cells (text, numbers, dates, errors).
  • COUNTIF – Counts cells that meet a single condition, like =COUNTIF(B2:B20, "Yes").
  • COUNTIFS – Counts cells that meet multiple conditions, like =COUNTIFS(A2:A20, "North", B2:B20, ">100").

For example, if you have a column of customer feedback with values "Good", "Bad", and blank cells, COUNTA would count all feedback entries, while COUNT would return 0 because none are numbers. COUNTIF could count how many are "Good".

Common Problems and How to Fix Them

One frequent issue is that COUNT returns 0 even when you see numbers. This often happens because the cells are formatted as text. To fix this, select the cells, go to Format > Number > Number, or use the VALUE function to convert text to numbers. Another issue is accidentally including the formula cell itself in the range, which can cause circular references. Always check that your range doesn't include the cell where you're writing the formula.

Another problem is using COUNT on a range that includes errors like #N/A. COUNT ignores errors, but if you want to count them, you'd need a different approach, like =SUMPRODUCT(--ISERROR(A1:A10)).

Counting with Conditions: COUNTIF and COUNTIFS

COUNTIF is extremely useful for tallying items that meet a specific criterion. For example, to count how many times "Apple" appears in a list of fruits in A2:A20, use =COUNTIF(A2:A20, "Apple"). For numeric conditions, use comparison operators in quotes: =COUNTIF(B2:B20, ">=100").

COUNTIFS allows multiple criteria across different ranges. For instance, to count orders from the "West" region with amounts over $500, with regions in A2:A20 and amounts in B2:B20, use =COUNTIFS(A2:A20, "West", B2:B20, ">500"). The result is the number of rows where both conditions are true.

Both functions support wildcards: * for any sequence of characters and ? for a single character. So =COUNTIF(A2:A20, "A*") counts all cells starting with "A".

Counting in Excel vs. Google Sheets

The COUNT functions work nearly identically in Microsoft Excel and Google Sheets, but there are minor differences. In Excel, the function names and syntax are the same, but Excel also has COUNTBLANK (which Google Sheets also has). One key difference: in Google Sheets, you can use COUNTIF with array formulas and the FILTER function more seamlessly. Also, Google Sheets uses comma as the argument separator, while some regional Excel versions use semicolons. If you're moving between the two, the formulas generally transfer without changes.

For Excel on Windows, the ribbon path for conditional formatting is Home > Conditional Formatting, but that's for visual highlighting, not counting. For counting, you still use formulas.

Frequently Asked Questions

How do I count non-empty cells in Google Sheets?

Use =COUNTA(range). For example, =COUNTA(A1:A10) returns the number of cells in that range that are not empty, including cells with spaces (which are considered non-empty).

How do I count cells with specific text in Google Sheets?

Use =COUNTIF(range, "text"). For example, =COUNTIF(A1:A10, "Pending") counts cells that exactly match "Pending". For partial matches, use wildcards: =COUNTIF(A1:A10, "*Pending*").

Why is my COUNT formula returning 0?

Most likely, the cells you're counting are formatted as text. Select the cells, go to Format > Number > Number, or use =COUNT(VALUE(range)) as an array formula (press Ctrl+Shift+Enter in Excel, or use ARRAYFORMULA in Sheets). Also, check for hidden characters or leading apostrophes.

Can I count cells based on color in Google Sheets?

Not with a built-in function. COUNTIF cannot use color as a criterion. You'd need to use Google Apps Script to write a custom function, or use a third-party add-on. In Excel, you can use the SUBTOTAL function with filtered cells, but still not directly by color without VBA.

How do I count unique values in a column?

Use =COUNTUNIQUE(range) in Google Sheets. For example, =COUNTUNIQUE(A1:A10) returns the number of distinct values. In Excel, you'd use =SUMPRODUCT(1/COUNTIF(range, range)) or the newer =COUNTA(UNIQUE(range)) (Excel 365).

What is the difference between COUNT and COUNTA?

COUNT counts only cells with numbers, while COUNTA counts all non-empty cells, including text, dates, and even error values. If you have a list of names, COUNTA will count them, but COUNT will return 0.

Practical Examples of Counting in Sheets

Let's say you have a spreadsheet tracking student test scores in column B (B2:B20). To find how many students took the test, use =COUNT(B2:B20) because scores are numbers. If some students were absent and left blank, they won't be counted. To count students who scored above 80, use =COUNTIF(B2:B20, ">80"). To count students who scored between 70 and 89, use =COUNTIFS(B2:B20, ">=70", B2:B20, "<=89").

For a sales log with columns for product (A) and quantity (B), to count how many times "Widget" appears, use =COUNTIF(A2:A100, "Widget"). To count rows where product is "Widget" and quantity is greater than 10, use =COUNTIFS(A2:A100, "Widget", B2:B100, ">10").

These examples show how COUNT and its variants can answer real questions about your data quickly.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.