ANALYZE DATA COUNT Function in Excel and Goo… Count the number of cells in a range that… Excel 2003+ Google Sheets Same syntax Microsoft Excel B2 =COUNT(value1, [value2], ...) A B Student Score 2 Alice 6 3 Bob Absent 4 Carol 91
Learning Hub Functions Analyze Data

COUNT Function in Excel and Google Sheets

Analyze Data 📊 Excel 2003+ ✓ Google Sheets Same syntax in both apps
Purpose
Count the number of cells in a range that contain numeric values
Return value
An integer representing how many cells in the supplied arguments contain numbers, including dates
COUNT is the most fundamental counting function in Excel and Google Sheets -- it tells you how many cells in a range actually contain a number. Not text, not blanks, not logical values like TRUE or FALSE: only real numeric values, which includes dates since they are stored as numbers internally. I use COUNT constantly in data-quality checks -- if a test-score column has 30 rows but COUNT returns 27, three scores are missing or stored as text and need investigation. COUNT pairs naturally with SUM to produce averages manually (SUM/COUNT = average), and understanding exactly what COUNT includes versus excludes is the foundation for choosing correctly between COUNTA, COUNTIF, and COUNTBLANK. Once those distinctions are clear, you have the full counting toolkit for any dataset.
Syntax
✓ Excel 2003+ ✓ Google Sheets = Same syntax
=COUNT(value1, [value2], ...)
Arguments
ArgumentRequiredDescription
value1 Required The first range or value to count. Can be a cell range like A2:A100, an individual cell, or a literal number. Text, blanks, and logical values in the range are ignored.
value2 ... Optional Additional ranges or values, up to 255 arguments. Counts from all arguments are combined into one total.
How it works
COUNT scans each argument and increments a counter for every cell that contains a number. Cells containing text strings are skipped. Blank cells are skipped. Cells containing TRUE or FALSE (logical values) are skipped. Dates are counted because Excel and Google Sheets store them as serial numbers internally -- a date is a number with a date format applied. Cells containing errors like #N/A or #DIV/0! are also skipped. When passed literal values rather than ranges, COUNT counts each numeric literal -- =COUNT(1,2,"three") returns 2 because "three" is text. The most important distinction to understand is COUNT versus COUNTA: COUNTA counts everything that is not blank, while COUNT counts only numbers. For conditional counting based on a criterion, use the COUNTIF function. For counting blank cells specifically, use COUNTBLANK. COUNT handles multiple ranges in one formula by listing them as comma-separated arguments.
Examples
1
Count how many test scores have been entered in a mixed column containing some numeric scores and some blank or text cells.
fx =COUNT(B2:B11)
A B
1 Student Score
2 Alice 82
3 Bob Absent
4 Carol 91
5 Dan
6 Ella 78
7 Finn 85
8 Gia N/A
9 Hugo 94
10 Iris
11 Jo 88
12 Count =COUNT(B2:B11)
Row 2: 6 — Six cells contain numeric scores: Alice 82, Carol 91, Ella 78, Finn 85, Hugo 94, Jo 88. Bob has the text Absent, Gia has N/A, and Dan and Iris are blank -- all four are excluded.
COUNT ignores Absent and N/A because they are text, and skips the two blank cells. Only actual numbers are counted. This makes COUNT ideal for measuring how complete a numeric data column actually is.
2
Use COUNT across two non-adjacent columns to count numeric entries in both January and March sales columns simultaneously.
fx =COUNT(B2:B6,D2:D6)
A B C D
1 Rep Jan Feb Mar
2 Alice 4200 3100 5100
3 Bob 2800 4700
4 Carol 3800 3400
5 Dan 5500 3900
6 Ella 4100 4600 4400
7 Count Jan+Mar =COUNT(B2:B6,D2:D6)
Row 2: 8 — Jan has 4 numeric entries (Bob is blank) and Mar has 4 numeric entries (Carol is blank). Total across both columns is 8.
Feb is not included in the formula. Adding comma-separated ranges lets you count any combination of columns without including the ones in between. This is how I measure completion across specific fields when auditing imported data.
3
Compare COUNT and COUNTA on the same column to identify how many cells have any entry versus how many have a numeric entry specifically.
fx =COUNT(B2:B11)
A B
1 Entry Value
2 1 82
3 2 Absent
4 3 91
5 4
6 5 78
7 6 TRUE
8 7 85
9 8
10 9 94
11 10 Pending
12 COUNT (numbers only) =COUNT(B2:B11)
13 COUNTA (any entry) =COUNTA(B2:B11)
Row 2: 5 — COUNT returns 5 -- only the numeric cells: 82, 91, 78, 85, 94. COUNTA returns 8 -- it also includes Absent, TRUE, and Pending. The two blank cells are excluded by both functions.
The difference -- 8 COUNTA minus 5 COUNT -- tells you 3 cells have non-numeric content (Absent, TRUE, Pending). This COUNT vs COUNTA comparison is one of the fastest data-quality diagnostics I run on any new dataset.
Common use cases
1. Count how many numeric scores have been entered in an assessment column to measure completion
=COUNT(B2:B100)
2. Count entries across multiple non-adjacent columns in a single formula
=COUNT(B2:B100,D2:D100)
3. Calculate an average manually by dividing SUM by COUNT for more control than the AVERAGE function
=SUM(B2:B100)/COUNT(B2:B100)
4. Compare COUNT and COUNTA to find how many non-numeric entries exist in a column
=COUNTA(B2:B100)-COUNT(B2:B100)
5. Count how many date values have been logged in a timestamp column
=COUNT(A2:A1000)
Common errors
COUNT returns less than expected
Some numbers in the range are stored as text -- COUNT skips text cells entirely. This is common with imported data.
Fix: Check with =ISNUMBER(B2) on a suspicious cell. If it returns FALSE, the value is text. Convert to numbers using Data > Text to Columns or by multiplying by 1.
COUNT returns zero for a column that has dates
Dates are formatted as text strings rather than real date values. COUNT counts real dates (which are numbers) but skips text dates.
Fix: Convert text dates to real dates using DATEVALUE: =DATEVALUE(A2). Real dates are numbers and will be counted by COUNT.
COUNT counts a cell you expected to be excluded
The cell contains a number formatted to look like text but is actually stored as a number. COUNT counts all numeric cells regardless of their format or display.
Fix: If the cell should not be counted, it must be truly non-numeric -- check with ISNUMBER.
Tips and variations
Use COUNT vs COUNTA to measure data quality
COUNT counts numbers; COUNTA counts everything non-blank. The difference COUNTA-COUNT tells you how many cells have text or logical values instead of numbers. This one-line diagnostic surfaces data-entry errors and import problems instantly.
=COUNTA(B2:B100)-COUNT(B2:B100)
Combine with SUM for a manual average
=SUM(range)/COUNT(range) gives the average of only the numeric cells, equivalent to AVERAGE. Use this when you need more control -- for example, to debug why AVERAGE is giving unexpected results by checking SUM and COUNT separately.
=SUM(B2:B100)/COUNT(B2:B100)
Use COUNTIF for conditional counting
COUNT has no criteria argument. When you need to count only cells meeting a condition -- above a threshold, equal to a value, matching a text pattern -- switch to the COUNTIF function which extends COUNT with a single criterion.
=COUNTIF(B2:B100,">80")
Excel vs Google Sheets
Excel vs Google Sheets
COUNT works identically in Excel 2003 and newer and every version of Google Sheets. The numeric-only counting behaviour, treatment of text and blank cells, and multiple argument syntax are the same in both applications.
Frequently asked questions
COUNT returns the number of cells in a range that contain numeric values, including dates and numbers stored as numbers. It ignores blank cells, text cells, and logical values. COUNT is the right choice when you need to know how many numeric entries exist in a range -- for example, how many score cells have been filled in, or how many dates have been logged.
COUNT counts only cells containing numbers (including dates). COUNTA counts every non-blank cell regardless of data type -- text, numbers, dates, errors, and logical values all qualify. Use COUNT when you specifically want numeric entries only. Use COUNTA when you want any entry at all, including text labels and TRUE/FALSE values.
COUNT counts all numeric cells in a range with no conditions. COUNTIF counts cells that meet a specific criterion -- for example, only cells equal to 100, or only cells greater than 50. Use COUNT for a simple total of filled numeric cells. Use COUNTIF when the count depends on the value in the cell.
COUNT ignores cells containing text, blank cells, and logical values. If your range has numbers stored as text -- a common result of importing data from CSV files or web pages -- COUNT skips them. Check with ISNUMBER to confirm whether cells are genuinely numeric. Also consider whether blank cells in the middle of your range are reducing the count.
Yes. COUNT accepts up to 255 arguments separated by commas: =COUNT(A2:A100,C2:C100,E5) counts numeric cells across three separate ranges in one formula. Each argument can be a range, individual cell, or literal number. The counts from all arguments are summed together.