Statistical
All versions
◉ 48 views
=COUNTA()
The COUNTA function counts the number of cells that are not empty in a range.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=COUNTA(value1, [value2], ...)
Hover argument names in the table for details.
Output typeNumber
Popularity70 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =COUNTA() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
value1 |
Any type | Required | The first argument representing the values that you want to count. |
value2 |
Any type | Optional | , ... Optional. Additional arguments representing the values that you want to count, up to a maximum of 255 arguments. |
▣ Examples
▦ Data
| Cell | Value |
|---|---|
A2 |
39790 |
A3 |
19 |
A4 |
22.24 |
A5 |
TRUE |
A6 |
#DIV/0! |
A7 |
39790 |
A8 |
19 |
A9 |
22.24 |
A10 |
TRUE |
A11 |
#DIV/0! |
Counts the number of nonblank cells in cells A2 through A6.
=COUNTA(A2:A6)
Result:
5
§ Remarks
- The COUNTA function counts cells containing any type of information, including error values and empty text (""). For example, if the range contains a formula that returns an empty string, the COUNTA function counts that value. The COUNTA function does not count empty cells.
- If you do not need to count logical values, text, or error values (in other words, if you want to count only cells that contain numbers), use the COUNT function.
- If you want to count only cells that meet certain criteria, use the COUNTIF function or the COUNTIFS function.
✦ Tips
- The COUNTA function counts cells containing any type of information, including error values and empty text (""). For example, if the range contains a formula that returns an empty string, the COUNTA function counts that value. The COUNTA function does not count empty cells.
- If you do not need to count logical values, text, or error values (in other words, if you want to count only cells that contain numbers), use the COUNT function.
- If you want to count only cells that meet certain criteria, use the COUNTIF function or the COUNTIFS function.
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!