Excel: How Many Cells Have Data? Quick Count
In this article
To find out how many cells in an Excel range contain data, use the COUNTA function: type =COUNTA(A1:A10) in an empty cell and press Enter. That returns the number of non-empty cells in the range. If you need to count only numbers, use COUNT instead. For a quick visual check, select the range and look at the status bar at the bottom of the Excel window: it shows the count of non-empty cells (labeled "Count") when multiple cells are selected.
What You'll Need
- Microsoft Excel (any recent version, desktop or web). The steps below apply to Excel for Microsoft 365, Excel 2019/2021, and Excel for the web. Menu labels may differ slightly by version or region.
- A worksheet with data in one or more columns or rows.
- An empty cell to hold the formula result (optional; you can also type the formula in the formula bar).
Step-by-Step
- Open your workbook and locate the column or row you want to count. For example, suppose your data is in column A, from A2 to A100.
- Click an empty cell where you want the result to appear, such as B1 or D1.
- Type the COUNTA formula. For a range, type
=COUNTA(A2:A100)and press Enter. This counts every cell that is not empty, including text, numbers, dates, and formulas that return an empty string (""). - If you only want numbers, use
=COUNT(A2:A100)instead. COUNT ignores text, blank cells, and logical values (TRUE/FALSE) in ranges. Dates are stored as numbers, so they are counted. - To count non-empty cells across multiple ranges, separate them with commas:
=COUNTA(A2:A100, C2:C100). Excel adds the counts from each range. - To count all non-empty cells in an entire column, use
=COUNTA(A:A). This includes the header if present. To exclude the header, use=COUNTA(A:A)-1or specify a range starting from row 2. - For a quick visual count without a formula, select the range with your mouse. Look at the status bar at the bottom of the Excel window. It displays "Count" for non-empty cells and "Numerical Count" for numbers only. If you don't see it, right-click the status bar and ensure "Count" is checked.
- To count cells that meet a condition, use COUNTIF or COUNTIFS. For example,
=COUNTIF(A2:A100, ">0")counts cells greater than zero.=COUNTIF(A2:A100, "*text*")counts cells containing "text". - To count non-empty cells in a pivot table, add the field to the Values area and set it to Count (not Sum). This counts non-empty entries per group.
Common Mistakes
- Using COUNT instead of COUNTA for text. COUNT only counts numbers; if your column contains names or categories, it will return zero or a lower number. Use COUNTA for any data type.
- Forgetting that COUNTA counts formulas returning empty strings. A formula like
=IF(A1="","",A1)returns an empty string, which COUNTA treats as non-empty. To count only visible data, use=COUNTIF(range,"<>")or filter first. - Including the header row. If you select A1:A100 and row 1 is a header, COUNTA includes it. Adjust the range to start at row 2, or subtract 1.
- Selecting the wrong range. Double-check that the range covers exactly the cells you intend. A common error is selecting A2:A100 but data extends to A200.
- Expecting the status bar to show count for a single cell. The status bar count appears only when multiple cells are selected.
- Confusing blank cells with cells containing spaces. A cell with a space character is not empty, so COUNTA counts it. Use TRIM or filter to identify such cells.
Tips
- Use Ctrl+Shift+End to quickly select from the active cell to the last used cell in the worksheet, then check the status bar for a count.
- To count non-empty cells in a filtered list, use the SUBTOTAL function with function number 103:
=SUBTOTAL(103, A2:A100). This counts only visible cells. - For a dynamic count that updates as you add data, convert your range to an Excel Table (Ctrl+T) and use structured references like
=COUNTA(Table1[Column1]). - Use Go To Special (Home > Find & Select > Go To Special > Constants) to select all non-empty cells in a range, then read the count in the status bar.
- If you need to count cells with specific formatting (e.g., colored cells), use the Find & Select > Find dialog with "Format" options, then "Find All" to see the count.
Troubleshooting
- COUNTA returns a number higher than expected: Check for cells with spaces, apostrophes, or formulas returning empty strings. Use
=COUNTIF(range,"<>")to count only cells with visible content, or filter to inspect. - COUNTA returns zero when there is data: Ensure the range is correct and that the data is not in a different sheet or hidden rows. Also check that the cells are not formatted as text with leading apostrophes (which still count as non-empty).
- Status bar count does not appear: Right-click the status bar and make sure "Count" is checked. If you have only one cell selected, the count won't show.
- Formula shows #NAME? error: Check the spelling of COUNTA. If you are using a non-English version of Excel, the function name may be localized (e.g., in French it's NBVAL).
- Count includes hidden rows: Use SUBTOTAL(103, range) to exclude manually hidden rows, or apply a filter and use SUBTOTAL.
- Count does not update after adding data: Ensure calculation is set to Automatic (Formulas > Calculation Options > Automatic). If you used a fixed range, expand it or convert to a Table.
Frequently Asked Questions
What is the difference between COUNT and COUNTA?
COUNT counts only cells containing numbers (including dates and times). COUNTA counts all non-empty cells, including text, numbers, logical values, errors, and formulas that return any value (even an empty string).
How do I count non-empty cells in a column excluding the header?
Use =COUNTA(A2:A100) instead of =COUNTA(A:A), or subtract 1: =COUNTA(A:A)-1 if the header is the only non-data entry.
Can I count cells with data across multiple sheets?
Yes. Use a 3D reference: =COUNTA(Sheet1:Sheet3!A1:A10) counts non-empty cells in the same range across all sheets from Sheet1 to Sheet3.
Why does COUNTA count cells that look empty?
Those cells likely contain a formula that returns an empty string (""), a space character, or a non-printing character. Use =COUNTIF(range,"<>") to count only cells with visible content, or use =SUMPRODUCT(--(LEN(TRIM(range))>0)) to ignore spaces.
How do I count only visible cells after filtering?
Use =SUBTOTAL(103, range). The 103 function number tells Excel to count non-empty visible cells only, ignoring rows hidden by filters.
Is there a way to count non-empty cells without a formula?
Yes. Select the range and look at the status bar at the bottom of the Excel window. It shows "Count" for non-empty cells. You can also use Find & Select > Go To Special > Constants to select all non-empty cells, then read the count in the status bar.