To count blank cells in Google Sheets, use =COUNTIF(A2:A100,""); this counts empty cells in the specified range, including cells whose formulas return an empty string. Replace A2:A100 with your own range. If you want a purpose-built function for blank cells, =COUNTBLANK(A2:A100) usually gives the same practical result.
What COUNTIF considers blank
COUNTIF checks each cell in a range against a condition, then returns how many cells match. In the example above, the condition is an empty string: the pair of quotation marks contains no characters. That condition matches cells that are genuinely empty and cells that display nothing because a formula returns an empty string.
This distinction matters because a cell can look blank without actually being unused. For example, a spreadsheet may contain formulas prepared for future data, but those formulas display nothing until someone fills in a related input. A formula that returns an empty string still occupies the cell, even though the cell appears empty on screen. COUNTIF with a blank condition can include that result.
By contrast, a cell containing a space is not blank. Neither is a cell containing a number formatted to appear invisible, a text value in a white font, or a value hidden by a custom number format. COUNTIF evaluates cell contents and criteria, not simply what is visually apparent. If a blank count seems unexpectedly low, check for spaces or hidden values before assuming the function is wrong.
How to set up the count
Choose a range that covers the cells you want to inspect, then enter the formula in a cell outside that range. For example, with responses in cells B2 through B51, the formula is:
With survey responses in B2:B51, enter: =COUNTIF(B2:B51,""). If 8 cells are empty or contain formulas returning empty strings, the result is 8.
The range can be a column, a row, or a rectangular block. To check a whole column, the range may be written as B:B, although a bounded range can be more efficient and avoids counting irrelevant cells outside the data area. For example, a checklist with tasks in A2:A30 can count missing task names using:
With checklist entries in A2:A30, enter: =COUNTIF(A2:A30,""). If five entries are blank, the result is 5.
In Google Sheets, type the formula into the formula bar or directly into a selected cell and press Enter. The result updates when cells in the range change. If you add rows later, make sure the formula’s range includes them; otherwise, the new blanks will not be counted.
COUNTIF compared with COUNTBLANK
For a straightforward blank-cell total, COUNTBLANK is often easier to read because its name describes exactly what it does. With a list in A2:A100, use:
With the cells to inspect in A2:A100, enter: =COUNTBLANK(A2:A100). The result is the number of blank cells in that range, including cells that return an empty string.
COUNTIF is more flexible: it can count blanks as one condition among many. For example, it can count a particular status, a value above a threshold, or cells matching a text pattern. That flexibility makes it useful when a spreadsheet already uses COUNTIF for other categories. COUNTBLANK is simpler when the only question is how many blanks are in a range.
Neither function tells you why a cell is blank. If you need to distinguish untouched cells from formulas that currently show nothing, use a different test. The choice depends on the question you are trying to answer, not just which function is shorter.
Count truly empty cells, not formula results
Sometimes “blank” means a cell that has never been filled in, rather than any cell that appears empty. In that case, the distinction between a truly empty cell and a formula returning an empty string is important. ISBLANK checks whether a cell is genuinely empty; it returns FALSE when a cell contains a formula, even if that formula displays no characters.
With possible blanks and formulas in A2:A100, use: =SUMPRODUCT(--ISBLANK(A2:A100)). This counts cells that are genuinely empty and excludes cells containing formulas that return an empty string.
Consider a column containing three untouched cells and one formula that currently displays nothing. COUNTIF with an empty condition and COUNTBLANK can count all four as blank for practical reporting. The ISBLANK-based calculation counts only the three untouched cells. That can be useful for auditing a template or checking whether users entered data, but it may be the wrong measure if you simply want to count what appears empty to a reader.
ISBLANK also returns FALSE for cells containing a space or other content. If your goal is to count cells with visible content regardless of whether they are numbers or text, a length-based test can be more appropriate. With values in A2:A100, use:
With the values to assess in A2:A100, enter: =SUMPRODUCT(--(LEN(A2:A100)>0)). It counts cells whose contents have a length greater than zero, including numbers and text, while excluding genuinely empty cells and formulas returning empty strings. A cell containing a space has a length, so it is counted; errors in the range can also affect the result.
Count blanks under a second condition
A common follow-up is counting blank cells only for rows that meet another requirement. COUNTIFS supports multiple criteria. For example, you might want the number of orders with no delivery date, but only where the status is “Shipped.” The criteria ranges need to correspond row by row and have the same dimensions.
With status values in A2:A100 and delivery dates in B2:B100, enter: =COUNTIFS(A2:A100,"Shipped",B2:B100,""). This counts rows where the status is Shipped and the delivery-date cell is blank under COUNTIFS criteria, including a formula result that is an empty string.
For another example, suppose a teacher wants to find missing scores only for students in a particular class. Put the class names in one column and scores in another, then use the class name as one criterion and the empty-string condition on the score range. This is more reliable than counting every missing score and trying to subtract students from other classes afterward.
When setting up multi-condition counts, check that each range starts and ends on the same rows. If one range starts at row 2 and another starts at row 3, the conditions will no longer refer to matching records, and the result may be misleading.
Common causes of an unexpected result
- Spaces in cells: A typed space is content, not a blank. Edit the cell or remove unwanted whitespace if it should count as empty.
- Formulas that display nothing: These can be counted as blank by COUNTIF and COUNTBLANK, even though the cells contain formulas. Use the ISBLANK-based approach when you specifically need truly empty cells.
- Range misses newer rows: If your formula checks A2:A50, blanks in row 51 and below are outside the count. Expand the range or use a suitable open-ended column range.
- Hidden content or formatting: A cell may look empty because its text is hidden or its value is displayed in an unusual format. Check the formula bar and formatting before changing the count formula.
- Wrong sheet or column: Confirm that the range refers to the intended data. If the range is on another sheet, include the sheet name, such as
Data!A2:A100. - Criteria punctuation: The blank criterion is written as two quotation marks with nothing between them. Extra spaces inside the quotes make it a different condition.
If a result does not match a manual count, inspect a few cells that appear empty. Select them and look at the formula bar: an empty display may come from a formula, a space, or a value hidden by formatting. Also check whether filters are involved. COUNTIF evaluates the cells in its specified range; it does not automatically restrict the calculation to only the rows currently visible after filtering.
Working with filtered data and growing lists
COUNTIF counts matching cells in the range whether their rows are visible or hidden by a filter. That behavior is useful when you want a total across the complete dataset, but it may surprise you if you expect the count to change as you filter rows. A normal COUNTIF formula is not a visible-rows-only count.
For a small, fixed list, a bounded range such as A2:A100 is easy to understand. For a list that regularly grows, an open-ended reference such as A2:A can include new entries without editing the formula. Consider whether the sheet contains other material far below the list; a clearly defined data area can make the result easier to maintain and explain.
If the list is on another tab, include the tab name in the range. For example, with entries in A2:A100 on a tab called Responses, use:
With the cells to count on the Responses tab in A2:A100, enter: =COUNTIF(Responses!A2:A100,""). If a sheet name contains spaces, enclose the name in single quotation marks, as in 'Survey Results'!A2:A100.
Frequently Asked Questions
Does COUNTIF count cells with formulas that return blank?
Yes. A blank-condition COUNTIF can count a cell whose formula returns an empty string, even though the cell is not truly empty. Use an ISBLANK-based count if you need to exclude formula-containing cells.
Is COUNTBLANK better than COUNTIF for empty cells?
For a simple blank count, COUNTBLANK is usually clearer and shorter. COUNTIF is useful when you need to combine a blank condition with other criteria or apply a different condition in the same style.
How do I count blanks in an entire Google Sheets column?
Use the column reference as the range, such as =COUNTIF(B:B,""). If you want to skip a header, use a range beginning below it, such as B2:B. A bounded range can be preferable when the sheet has unrelated content elsewhere in the column.
Why does my blank count ignore a cell that looks empty?
The cell may contain a space, a hidden value, or a formula result that your chosen test handles differently. Check the formula bar and use COUNTIF or COUNTBLANK for cells that display blank, or ISBLANK when only genuinely empty cells should count.
Does COUNTIF count only visible blank rows after I apply a filter?
No. COUNTIF evaluates its specified range, including rows hidden by a filter. Filtering changes what is displayed, not the cells included in a standard COUNTIF calculation.
Can I count blanks only when another column has a particular value?
Yes. Use COUNTIFS with one criterion for the other column and an empty-string criterion for the cells to check. Make sure both ranges cover the same rows so each condition applies to the same record.
Related
- Excel Accounting Format: Make Negative Values Display in Red
- Excel Accounting vs Currency: Key Differences Explained
- Excel Data Model vs Power Query: How They Work Together
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Insert Citations in Word Using Mendeley CiteTo insert a Mendeley citation in Word, open your document, launch the Mendeley Cite add-in from the References…
- Date in Google Sheets: Enter, Format, and CalculateTo enter a date in Google Sheets, type it into a cell in a format your spreadsheet recognizes,…
- How to Highlight a Picture in Excel with a Custom BorderTo highlight a picture in Excel for Microsoft 365 on Windows, select the picture, open the Picture Format…
- Google Sheets Calendar Dropdown: How to Add a Date PickerTo add a calendar picker in Google Sheets, select the cells, choose Data > Data validation > Add…
- Excel Find and Replace Shortcut: Keys, Options, and TipsIn Excel for Microsoft 365 on Windows, press Ctrl+H to open Find and Replace, then enter the text…
- How to Make a Brochure in Microsoft Word, Step by StepTo make a brochure in Microsoft Word, start with a brochure template or create a landscape document with…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.