---
title: "COUNTA function in Excel: syntax and examples | ExcelSavvy"
description: "How to use COUNTA in Excel and Google Sheets: count every cell that is not empty."
canonical_url: "https://excelsavvy.com/functions/counta"
meta:
  "og:description": "How to use COUNTA in Excel and Google Sheets: count every cell that is not empty."
  "og:image": "https://excelsavvy.com/_og/d/c_Page%2Ctitle_~Q09VTlRBIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBDT1VOVEEgaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IGNvdW50IGV2ZXJ5IGNlbGwgdGhhdCBpcyBub3QgZW1wdHku%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~Q09VTlRBKHZhbHVlMSwgW3ZhbHVlMl0sIC4uLik%2Cp_Ii9mdW5jdGlvbnMvY291bnRhIg%2Cs_jqGniWiomc-ooAN4.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "COUNTA function in Excel: syntax and examples | ExcelSavvy"
  "twitter:image": "https://excelsavvy.com/_og/d/c_Page%2Ctitle_~Q09VTlRBIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBDT1VOVEEgaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IGNvdW50IGV2ZXJ5IGNlbGwgdGhhdCBpcyBub3QgZW1wdHku%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~Q09VTlRBKHZhbHVlMSwgW3ZhbHVlMl0sIC4uLik%2Cp_Ii9mdW5jdGlvbnMvY291bnRhIg%2Cs_jqGniWiomc-ooAN4.png"
---

> Index of every page on this site: [llms.txt](https://excelsavvy.com/llms.txt)

# **The COUNTA function**

Counts the cells that are not empty: numbers, text, logical values and errors.

=

COUNTA(

## **How to use COUNTA**

COUNTA counts the cells that have something in them. A cell can hold a number, a name, TRUE or an error, and COUNTA counts them all. Only truly empty cells are skipped. Think of counting the taken seats in a cinema, no matter who is sitting there.

Use it to find out how many names are on a staff list, how many orders have a customer filled in, or how many rows of a form have been answered. `**=COUNTA(A2:A6)**` counts the filled cells in A2:A6. If you include the heading row, as in `**=COUNTA(A1:A6)**`, the heading counts as one too.

COUNTA checks whether a cell is filled, not what it holds. A formula that returns empty text, like `**=IF(B2="","",B2)**`, counts as filled even though the cell looks blank. A single space counts too.

To count only numbers, use COUNT. To count the empty cells, use COUNTBLANK. To count the filled cells that meet a condition, use COUNTIF or COUNTIFS.

## **Syntax**

```
COUNTA(value1, [value2], ...)
```

<dl><dt>**value1 **</dt>
<dd>The first value, cell or range.</dd>
<dt>**value2 **(optional)</dt>
<dd>More values or ranges.</dd></dl>

## **Examples**

C1=COUNTA(A2:A6)

|  | A | B | C |
| --- | --- | --- | --- |
| 1 | Units |  | **4** |
| 2 | 4 |  | |
| 3 | n/a |  | |
| 4 | 7 |  | |
| 5 |  |  | |
| 6 | 2 |  | |

C1=COUNTA(A1:A6)

|  | A | B | C |
| --- | --- | --- | --- |
| 1 | Units |  | **5** |
| 2 | 4 |  | |
| 3 | n/a |  | |
| 4 | 7 |  | |
| 5 |  |  | |
| 6 | 2 |  | |

## **Common COUNTA mistakes**

- COUNTA counts cells that look empty

  Those cells hold a formula that returns empty text, or a space you typed by accident. COUNTA sees them as filled. Count the filled cells another way with `**=ROWS(A2:A6)-COUNTBLANK(A2:A6)**`, because COUNTBLANK treats empty text as blank. Delete stray spaces with the Delete key.
- My count is one too high

  The range probably includes the heading row. Start the range at the first row of data, like `**=COUNTA(A2:A6)**`.
- COUNTA counts numbers and errors, but I only want text

  COUNTA counts everything that is filled. To count only the cells with text, use `**=COUNTIF(A2:A6,"*")**`.

## **Practice COUNTA**

- [**1****Count filled-in cells with COUNTA**→](https://excelsavvy.com/practice/count/counta-non-empty-cells)

## **Questions**

<details>

<summary>

### How do I count non-empty cells in Excel?

</summary>

Use COUNTA on the range: =COUNTA(A2:A100). It counts every cell with a number, text, TRUE or FALSE, or an error, and skips the truly empty ones.

</details>

<details>

<summary>

### What is the difference between COUNT and COUNTA?

</summary>

COUNT counts only numbers and dates. COUNTA counts every cell that is not empty, so a list of names gives the right count with COUNTA and 0 with COUNT.

</details>

<details>

<summary>

### Does COUNTA count hidden rows?

</summary>

Yes, COUNTA counts hidden and filtered-out rows too. To count only the visible ones, use =SUBTOTAL(103,A2:A100).

</details>

<details>

<summary>

### Does COUNTA count zeros?

</summary>

Yes. A zero is a value, so the cell counts as filled. To leave zeros out, use =COUNTIF(A2:A100,"&lt;&gt;0") on a column of numbers.

</details>

## **Related functions**

- [**COUNT**](https://excelsavvy.com/functions/count)
- [**COUNTBLANK**](https://excelsavvy.com/functions/countblank)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://excelsavvy.com/#identity","@type":"Organization","name":"ExcelSavvy","url":"https://excelsavvy.com/","logo":{"@id":"https://excelsavvy.com/#logo"}},{"@id":"https://excelsavvy.com/#website","@type":"WebSite","inLanguage":"en-US","name":"ExcelSavvy","url":"https://excelsavvy.com/","alternateName":["Excel Savvy","ExcelSavvy.com","PracticeExcel","Practice Excel Online"],"publisher":{"@id":"https://excelsavvy.com/#identity"},"workTranslation":[{"@id":"https://excelopgaver.dk/#website"},{"@id":"https://excelpraxis.de/#website"}]},{"@id":"https://excelsavvy.com/functions/counta#webpage","dateModified":"2026-11-16","description":"How to use COUNTA in Excel and Google Sheets: count every cell that is not empty.","name":"COUNTA function in Excel: syntax and examples","url":"https://excelsavvy.com/functions/counta","@type":["WebPage","FAQPage"],"breadcrumb":{"@id":"https://excelsavvy.com/functions/counta#breadcrumb"},"isPartOf":{"@id":"https://excelsavvy.com/#website"},"mainEntity":[{"@id":"https://excelsavvy.com/functions/counta#/schema/question/1"},{"@id":"https://excelsavvy.com/functions/counta#/schema/question/2"},{"@id":"https://excelsavvy.com/functions/counta#/schema/question/3"},{"@id":"https://excelsavvy.com/functions/counta#/schema/question/4"}],"potentialAction":[{"@type":"ReadAction","target":["https://excelsavvy.com/functions/counta"]}],"primaryImageOfPage":{"@id":"https://excelsavvy.com/#logo"}},{"@id":"https://excelsavvy.com/functions/counta#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://excelsavvy.com","position":1},{"@type":"ListItem","name":"Excel functions","item":"https://excelsavvy.com/functions","position":2},{"@type":"ListItem","name":"COUNTA function in Excel: syntax and examples","position":3}]},{"@id":"https://excelsavvy.com/functions/counta#article","dateModified":"2026-11-16","description":"How to use COUNTA in Excel and Google Sheets: count every cell that is not empty.","headline":"COUNTA function in Excel: syntax and examples","inLanguage":"en-US","thumbnailUrl":"https://excelsavvy.com/_og/d/c_Page%2Ctitle_~Q09VTlRBIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBDT1VOVEEgaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IGNvdW50IGV2ZXJ5IGNlbGwgdGhhdCBpcyBub3QgZW1wdHku%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~Q09VTlRBKHZhbHVlMSwgW3ZhbHVlMl0sIC4uLik%2Cp_Ii9mdW5jdGlvbnMvY291bnRhIg%2Cs_jqGniWiomc-ooAN4.png","@type":["Article","TechArticle"],"author":{"@id":"https://excelsavvy.com/#identity"},"image":{"@id":"https://excelsavvy.com/#/schema/image/1"},"isPartOf":{"@id":"https://excelsavvy.com/functions/counta#webpage"},"mainEntityOfPage":{"@id":"https://excelsavvy.com/functions/counta#webpage"},"publisher":{"@id":"https://excelsavvy.com/#identity"}},{"@id":"https://excelsavvy.com/functions/counta#/schema/question/1","@type":"Question","inLanguage":"en-US","name":"How do I count non-empty cells in Excel?","acceptedAnswer":{"@type":"Answer","text":"Use COUNTA on the range: =COUNTA(A2:A100). It counts every cell with a number, text, TRUE or FALSE, or an error, and skips the truly empty ones."}},{"@id":"https://excelsavvy.com/functions/counta#/schema/question/2","@type":"Question","inLanguage":"en-US","name":"What is the difference between COUNT and COUNTA?","acceptedAnswer":{"@type":"Answer","text":"COUNT counts only numbers and dates. COUNTA counts every cell that is not empty, so a list of names gives the right count with COUNTA and 0 with COUNT."}},{"@id":"https://excelsavvy.com/functions/counta#/schema/question/3","@type":"Question","inLanguage":"en-US","name":"Does COUNTA count hidden rows?","acceptedAnswer":{"@type":"Answer","text":"Yes, COUNTA counts hidden and filtered-out rows too. To count only the visible ones, use =SUBTOTAL(103,A2:A100)."}},{"@id":"https://excelsavvy.com/functions/counta#/schema/question/4","@type":"Question","inLanguage":"en-US","name":"Does COUNTA count zeros?","acceptedAnswer":{"@type":"Answer","text":"Yes. A zero is a value, so the cell counts as filled. To leave zeros out, use =COUNTIF(A2:A100,\"\u003C>0\") on a column of numbers."}},{"@id":"https://excelsavvy.com/#logo","@type":"ImageObject","caption":"ExcelSavvy","contentUrl":"https://excelsavvy.com/brand/practiceexcel/icon-512.png?v=3","inLanguage":"en-US","url":"https://excelsavvy.com/brand/practiceexcel/icon-512.png?v=3"},{"@id":"https://excelsavvy.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://excelsavvy.com/_og/d/c_Page%2Ctitle_~Q09VTlRBIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBDT1VOVEEgaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IGNvdW50IGV2ZXJ5IGNlbGwgdGhhdCBpcyBub3QgZW1wdHku%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~Q09VTlRBKHZhbHVlMSwgW3ZhbHVlMl0sIC4uLik%2Cp_Ii9mdW5jdGlvbnMvY291bnRhIg%2Cs_jqGniWiomc-ooAN4.png","inLanguage":"en-US","url":"https://excelsavvy.com/_og/d/c_Page%2Ctitle_~Q09VTlRBIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBDT1VOVEEgaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IGNvdW50IGV2ZXJ5IGNlbGwgdGhhdCBpcyBub3QgZW1wdHku%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~Q09VTlRBKHZhbHVlMSwgW3ZhbHVlMl0sIC4uLik%2Cp_Ii9mdW5jdGlvbnMvY291bnRhIg%2Cs_jqGniWiomc-ooAN4.png"}]}
```

## Sitemap

See the full [sitemap](https://excelsavvy.com/sitemap.md) for all pages.
