Excel beginner

How to Count Non-Empty, Numeric, and Blank Cells in Excel?

Counting cells accurately is crucial for data analysis. This guide shows you how to count non-empty, numeric, and blank cells in Excel.

Formula Genius can generate a draft from a plain-English prompt. Supported formulas can be checked with sample cases; review the coverage on the result.

The formula

Prompt

"Count cells that are not empty, count cells with numbers only, and count blank cells in a range"

Excel
=COUNTA(range), =COUNT(range), =COUNTBLANK(range)

This formula counts the number of non-empty cells, numeric cells, and blank cells in a specified range.

Step-by-step breakdown

  1. Use COUNTA to count all non-empty cells in the range.
  2. Use COUNT to count only the cells that contain numbers.
  3. Use COUNTBLANK to count the cells that are empty.
  4. Combine these functions to get a comprehensive overview of the data in the range.

Edge cases & warnings

  • Cells containing formulas that return empty strings are counted as non-empty by COUNTA.
  • COUNT only counts numeric values, ignoring text and errors.
  • COUNTBLANK will not count cells with spaces or formulas that return empty strings.

Examples

Prompt

"Range A1:A5 with values {1, 'text', , 4, ''}"

Excel
COUNTA returns 4, COUNT returns 2, COUNTBLANK returns 1
Prompt

"Range B1:B3 with values {'apple', '', 3}"

Excel
COUNTA returns 2, COUNT returns 1, COUNTBLANK returns 1

Frequently asked questions

What does COUNTA count?

COUNTA counts all non-empty cells, including those with text, numbers, and errors.

Can I count cells with specific criteria?

Yes, use COUNTIF or COUNTIFS for counting cells based on specific conditions.

How do I count only numeric cells?

Use the COUNT function to count only cells that contain numbers.

Can't find what you need?

Describe a formula in plain English. Formula Genius drafts and explains it, and can check supported formulas on sample cases.