COUNTBLANK function

Use the COUNTBLANK function, one of the Statistical functions, to count the number of empty cells in a range of cells.

Syntax

COUNTBLANK(range)

The COUNTBLANK function syntax has the following arguments:

  • Range    Required. The range from which you want to count the blank cells.

Remark

Cells with formulas that return "" (empty text) are also counted. Cells with zero values are not counted.

Example

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet.

Data

Data

6

27

4

34

Formula

Description

Result

=COUNTBLANK(A2:B5)

Counts empty cells in the range above.

2

Note: Copying from some browsers may add an apostrophe to the beginning of the formula when it's pasted in Excel. If the formula does not show a result, select that cell, press F2, delete the apostrophe, and then press Enter.

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

See Also

Overview of formulas in Excel

How to avoid broken formulas

Find and correct errors in formulas

Excel keyboard shortcuts and function keys

Statistical functions (reference)

Excel functions (alphabetical)

Excel functions (by category)

Expand your skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×