Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets COUNTBLANK: How to Count Empty Cells

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

COUNTBLANK counts how many cells in a chosen range are empty, and it does it in one formula rather than by eyeballing a column. Type =COUNTBLANK(A2:A100) and Google Sheets returns the number of blank cells in that range instantly. It is the fastest way to audit a checklist, a form export or a contact list for missing data, and it needs nothing beyond a normal Google Sheets spreadsheet.

One thing to get straight before you start: COUNTBLANK treats a cell containing a formula that returns an empty string as blank. That surprises a lot of people, so the tips and troubleshooting sections below cover it in detail. Labels and menus can differ slightly by version, device and region, but the function itself behaves identically in the browser, the Android app and the iPhone and iPad app.

What You'll Need

  • A Google account and a spreadsheet open in Google Sheets. Google Sheets is free and works in any modern browser, plus the official Android and iOS apps.
  • A range of cells you want to check — or an empty sheet you want to test the function in first.
  • Optional: a header row you exclude from the count, so the title text is not counted as data.
  • Optional: conditional formatting if you want to highlight the blanks visually alongside the count.

Step-by-Step

  1. Open your spreadsheet in Google Sheets. Sign in with the account that owns or can edit the file. On mobile, use the Google Sheets app from the Play Store or App Store rather than a third-party spreadsheet app, which may not support all functions.
  2. Click the blank cell where you want the result. Pick a spot outside the range you plan to count, so the formula never tries to count its own output. A cell just below or beside your table is ideal.
  3. Type =COUNTBLANK( including the equals sign. As you type, an autocomplete box appears. You can click COUNTBLANK in that list, or just keep typing. On mobile the formula bar is above the keyboard; tap it and type the same text.
  4. Select the range. Drag across the cells with your mouse, or type the range address directly, such as B2:B50. Typing is usually more reliable for long columns. If your range spans several blocks, use a comma between each: B2:B50,D2:D50.
  5. Close the bracket and press Enter. The completed formula looks like =COUNTBLANK(B2:B50). The cell now shows a number, and that number is the count of empty cells in the range.
  6. Check the total makes sense. Count the rows in your range and compare: if you have 49 data rows and 12 are filled, you should see 37 blank. A wildly different figure usually means the range grabbed the wrong rows or includes trailing empty rows far below your data.
  7. Lock the range if you plan to drag the formula. Press Ctrl+Shift+4 (Windows, ChromeOS) or Cmd+Shift+4 (Mac) to add dollar signs, or type them yourself: =COUNTBLANK($B$2:$B$50). Without the dollar signs, copying the formula sideways shifts the range and gives misleading counts.
  8. Copy the formula down or across if you need counts per column. Select the cell, drag the small fill handle, or copy and paste. Each copy checks its own column.
  9. Use it with IF for a quick readiness check. A formula such as =IF(COUNTBLANK(B2:B50)>0,"Incomplete","Ready to send") gives a plain-language status, which is handy for shared trackers where not everyone reads numbers.
  10. Fix the output format. If the result shows as a decimal or a date, select the cell and use Format > Number > Automatic or Number. COUNTBLANK returns a whole number, so any other format is a display setting, not an error.
  11. Freeze what you need before sharing. If the formula pulls from another sheet, reference it with the sheet name: =COUNTBLANK(Responses!B2:B50). Sheet names with spaces need single quotes, like 'Form Responses'!B2:B50. Keep the spelling exact or you will get a reference error.

Common Mistakes

Counting a whole column. =COUNTBLANK(B:B) works, but it counts every blank in the entire column, including the hundreds of thousands of empty rows below your data. The result is technically correct and completely useless. Always close the range at the last real row.

Expecting spaces to count as blank. A cell that looks empty but contains a space, a non-breaking space or an apostrophe is not blank. COUNTBLANK returns zero for it. This is the single most common reason a spreadsheet says "nothing is missing" when something visibly is.

Forgetting formula-driven blanks. If a cell holds =IF(A2="","",A2*2) and the condition fails, COUNTBLANK counts that cell as blank even though it contains a formula. That is how the function is defined, not a bug, but it catches people comparing COUNTBLANK against manual inspection.

Mixing COUNTBLANK with COUNTA. COUNTA counts non-empty cells, so COUNTBLANK plus COUNTA should equal the range size. If they do not, you have a formula-produced empty string in the mix — COUNTA counts it as filled while COUNTBLANK counts it as blank.

Leaving the range relative. A range without dollar signs changes when the formula is copied, which produces different totals across columns that look identical.

Tips

  • Pair COUNTBLANK with conditional formatting: select the range, open Format > Conditional formatting, choose "Is empty" as the rule. The blanks are then highlighted, so you see where the gaps are, not just how many.
  • Use COUNTBLANK with cell ranges rather than multiple separate arguments when you can. =COUNTBLANK(B2:B50) is easier to audit than five comma-separated ranges.
  • To count blanks in more than one sheet, write one COUNTBLANK per sheet and add them, or use =COUNTBLANK(Sheet1!B2:B50)+COUNTBLANK(Sheet2!B2:B50).
  • If you need to know which rows are blank rather than how many, a helper column with =IF(B2="","Missing","OK") combined with Filter is usually more useful than a count.
  • Before emailing a shared sheet, drop a COUNTBLANK next to each required column. It reads faster than scanning a spreadsheet for holes.

Troubleshooting

If COUNTBLANK returns 0 but you can see empty cells, check for spaces and invisible characters. Select a suspect cell and look at the formula bar: anything after the equals sign or any visible gap means it is not truly empty. Use Find and Replace to search for a single space and replace it with nothing, but work on a copy first — that edit changes every matching cell in the sheet.

If the formula shows a red error, the usual causes are unbalanced brackets, a missing equals sign, or a range reference to a sheet that does not exist. Click the cell and read the message. A #NAME? error almost always means the sheet name is misspelled or lacks required single quotes. A #REF! error means a referenced sheet or range was deleted.

If the count changes unexpectedly after you edit other cells, your range is probably relative and has shifted. Rewrite it with dollar signs and re-enter it.

If the whole column reference is slow on a very large sheet, replace it with a bounded range through the last used row. COUNTBLANK over a full column recalculates more slowly than you would expect on files with thousands of rows.

If nothing works, create a fresh sheet, type three values in A1, leave A2 empty, put the formula in B1 and confirm it returns 1. That isolates whether the problem is the function or your data.

Frequently Asked Questions

Does COUNTBLANK count cells with a space in them?

No. A space is a character, so the cell is not empty. Clean the range first or use a helper formula that tests the trimmed length.

What is the difference between COUNTBLANK and COUNTIF with blank criteria?

COUNTBLANK counts only truly empty cells and additionally catches formula cells returning an empty string. COUNTIF with an empty string criteria treats formula blanks as not matching. Use COUNTBLANK when you want the simplest count of empty cells.

Can I count blanks in more than one range at once?

Yes. Separate the ranges with commas: =COUNTBLANK(A2:A20,C2:C20).

Does COUNTBLANK work on a filtered view?

It counts the cells in the range regardless of filters or hidden rows. If you need visible rows only, that requires a different approach, such as a helper column plus SUBTOTAL.

Will COUNTBLANK count merged cells as blank?

A merged block counts as one cell with a value, so a span of five merged rows contributes one non-blank and four blanks in the underlying structure. Unmerge before counting if the result matters.

Does it work the same in the mobile apps?

Yes. The function is identical on the web, Android and iOS. You type it in the formula bar; the app may suggest it as you type.