The COUNTBLANK function in Excel is used to count the number of blank cells within a given range. Unlike COUNTA, which counts non-empty cells, COUNTBLANK focuses specifically on empty cells. Here’s how it works:
To count blank cells in the range B5:B15, use:
=COUNTBLANK(B5:B15) // Returns 3
This counts the 3 blank cells in the specified range.
If you have multiple non-adjacent ranges (e.g., A1:A10 and C1:C10), use the SUM function with COUNTBLANK:
=SUM(COUNTBLANK(A1:A10), COUNTBLANK(C1:C10))
Remember that COUNTBLANK considers cells with formulas that return an empty string (“”) as blank. It’s a handy function for checking empty cells, especially when they might appear blank but contain invisible characters.