The COUNTA function in Google Sheets returns a count of the number of values in a dataset.
Parameters
value1: The first value or range to count.value2, ...: [Optional] Additional values or ranges to count.
Step-by-Step Tutorial
-
Using
COUNTAwith individual values:- Example:
=COUNTA(1, "Hello", TRUE) - Result:
3
- Example:
-
Using
COUNTAwith a range of cells:- Example: If
A1:A5has the values5, "Apple", "", 8, "Orange", then=COUNTA(A1:A5)will return5.
- Example: If
Working with a Single Value, a List, and a Range
COUNTA accepts values one at a time, as a comma-separated list, or as a range — mix and match freely.
- Single value:
=COUNTA(A1)— returns1ifA1is non-empty,0if it's blank. - List of values:
=COUNTA(A1, A2, A3)— checks each cell individually and counts the non-empty ones. - Range:
=COUNTA(A1:A10)— counts every non-empty cell in the range. - Mixed:
=COUNTA(A1, A3:A6, "text")— you can combine single cells, ranges, and literal values in one call.
Video Example
Use Cases and Scenarios
- Data Cleanup: Count the number of non-empty cells in a dataset.
- Survey Analysis: Calculate the total number of responses received.
- Inventory Management: Determine the total number of items in stock.
Related Functions
COUNT: Count the number of cells in a range that contains numbers.COUNTBLANK: Count empty or blank cells in a range.COUNTIF: Count cells that meet specific criteria.