Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

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:B4)

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 or get support in Communities.

See Also

Overview of formulas in Excel

How to avoid broken formulas

Find and correct errors in formulas

Excel keyboard shortcuts and function keys

Excel functions (alphabetical)

Excel functions (by category)

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×