The COUNT function in Excel counts how many cells in a range contain numbers. It’s useful for quickly tallying numeric entries like sales figures, IDs, or dates—ignoring text, blanks, and logical values. No special setup is required beyond having Excel installed and a worksheet with numeric data.
What You'll Need
- Microsoft Excel (desktop version: Windows or macOS)
- A worksheet with numeric data in a contiguous or non-contiguous range
- Basic understanding of cell references (e.g., A1, B2:B10)
Step-by-Step
- Open your Excel workbook and navigate to the worksheet containing the data you want to count.
- Select the cell where you want the count result to appear (e.g., D5 for a summary below your data).
- Type the equals sign (=) to start a formula.
- Type COUNT followed by an opening parenthesis:
=COUNT(. - Specify the range of cells to count. You can either:
- Click and drag to highlight the range (e.g., A2:A20), or
- Type the range manually (e.g.,
=COUNT(A2:A20)), or - Hold Ctrl (Windows) or Command (macOS) and click multiple non-contiguous ranges (e.g.,
=COUNT(A2:A10,C2:C8)).
- Close the formula with a closing parenthesis:
). - Press Enter. Excel will display the count of cells containing numbers in your selected range(s).
Common Mistakes
- Using COUNT instead of COUNTA: COUNT only counts numbers. If your data includes text (e.g., product names), COUNT will return 0 for text-only cells. Use COUNTA to count all non-empty cells.
- Including headers by accident: Highlighting row 1 (e.g., A1:A20) when A1 is a header like "Sales" will include the header text in the range but ignore it in the count—only numbers count. Double-check your range doesn’t accidentally omit or include header rows.
- Entering text that looks like numbers: If cells contain numbers stored as text (e.g., '123 with a leading apostrophe), COUNT ignores them. Convert them to true numbers using
=VALUE(A2)or the Error Checking option (green triangle > Convert to Number). - Forgetting to update the range: If you add new rows, COUNT won’t auto-expand. Manually adjust the range or use COUNTA with a table (Ctrl+T) and structured references like
=COUNT(Table1[Sales]).
Tips
- Use COUNT with filters: If you’ve filtered data (Data > Filter), COUNT still counts *all* cells in the range, including hidden ones. Use
=SUBTOTAL(102, A2:A20)instead to count only visible filtered rows. - Combine with other functions: Wrap COUNT in IF statements for conditional logic, e.g.,
=IF(COUNT(A2:A10)>5,"High volume","Low volume"). - Count dates correctly: Excel stores dates as serial numbers (e.g., 1/1/2024 = 45292), so COUNT includes them. Use COUNTIF or COUNTIFS for date-specific counts (e.g.,
=COUNTIF(A2:A20,">="&DATE(2024,1,1))). - Keyboard shortcut for auto-sum: Select the cell below your data column, then press Alt+= (Windows) or ⌘+Shift+T (macOS) to insert an auto-sum formula. Excel defaults to SUM, but you can change SUM to COUNT in the formula bar.
Troubleshooting
- Formula shows as text instead of computing: Check if the cell is formatted as Text. Right-click the cell > Format Cells > Number > General, then re-enter the formula.
- COUNT returns 0 when numbers are present: Verify the cells aren’t formatted as Text (green error triangle in top-left corner). Use the Error Checking button to convert to numbers. Also, ensure there are no leading spaces (use TRIM() to clean).
- Unexpected result after copying/pasting: Pasting from external sources may bring hidden characters. Paste Special > Values only, then reapply COUNT.
- Non-contiguous ranges not working: Ensure ranges are separated by commas (not semicolons) in US locale. In some European locales, use semicolons instead:
=COUNT(A2:A10;C2:C8). Check your system’s list separator in Region settings. - Formula recalculates slowly or shows #NAME?: This usually means Excel doesn’t recognize COUNT. Confirm you’re not in a protected sheet without edit permissions. Also, check for typos (e.g., “COUTN”) or missing parentheses. Restart Excel if the function list doesn’t appear in auto-complete.
Frequently Asked Questions
Does COUNT include cells with zero?
Yes. Zero (0) is a number, so COUNT includes cells containing 0. To exclude zeros, use=COUNTIF(range,"<>0") or =COUNTIFS(range,">0",range,"<0") for non-zero numeric entries.
Can COUNT count cells in another workbook or worksheet?
Yes. Reference external sheets like=COUNT(Report!A2:A20) or =COUNT('[SalesData.xlsx]Sheet1'!B2:B50). The other workbook must be open for the link to update automatically; otherwise, Excel shows the last known value.
Why does my COUNT formula show the formula instead of the result?
This happens if the cell is formatted as Text *before* entering the formula. Fix it by selecting the cell, changing the format to General, pressing F2 to edit, then pressing Enter. If the formula bar shows the equals sign but the cell doesn’t, it’s a formatting issue—not a broken function.Does COUNT count error values like #N/A?
No. Error values are not numbers, so COUNT ignores them. To count numeric cells *excluding* errors, use=COUNTIFS(range,"<1E100",range,">-1E100") (a workaround) or COUNTIF with ISNUMBER logic in newer Excel versions.
Is there a limit to how many ranges COUNT can handle?
Yes. COUNT accepts up to 255 arguments (ranges or values) in modern Excel (2016 and later). Each range can contain over 1 million cells, but performance may slow with extremely large ranges. For massive datasets, consider Power Query or PivotTables.What’s the difference between COUNT, COUNTA, and COUNTIF?
COUNT counts only numeric cells. COUNTA counts all non-empty cells (text, numbers, errors, formulas returning blanks). COUNTIF adds conditions (e.g.,=COUNTIF(A2:A20,">100") to count numbers over 100). Use COUNTIFS for multiple conditions.