Count Nonblank Excel Cells with COUNTIF and COUNTIFS
Question details
Count nonblank cells in an Excel range and apply multiple conditions when needed.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user wants to count populated cells without including empty values and learn when to use COUNTIFS.
- Observed behavior
- The desired result is a count of nonblank cells, optionally limited by additional criteria.
Identify the range to count and check whether it contains formulas that return an empty string or cells containing only spaces. These can affect how different counting functions treat the cells.
Use COUNTIF to Count Nonblank Cells
Use COUNTIF when you need a single count of cells that are not blank.
In Excel, click an empty cell where you want the count to appear.
Type =COUNTIF(A1:A10,"<>") and press Enter. Replace A1:A10 with the range you want to count.
Compare the result with the cells in the selected range. Cells containing only spaces are treated as nonblank.

Use COUNTIFS to Apply Multiple Conditions
Use COUNTIFS when a nonblank cell must also meet one or more other criteria.
Count Nonblank Cells in WPS Spreadsheet
Use COUNTIF in WPS Spreadsheet to count nonblank cells, or add criteria with COUNTIFS when you need to filter the count.
- 1. Open your spreadsheet: Open WPS Spreadsheet and select Open to load your workbook.
- 2. Choose a result cell: Click an empty cell where you want the count.
- 3. Enter COUNTIF: Type =COUNTIF(A1:A10,"<>") in the cell and press Enter. Change the range to match your data.
- 4. Add conditions if needed: For multiple criteria, enter a formula such as =COUNTIFS(A1:A10,"<>",B1:B10,"Complete") in the result cell.

Frequently Asked Questions
Do I need to combine COUNTIF and COUNTA to count nonblank cells?
No. Enter =COUNTIF(A1:A10,"<>") in a result cell to count nonblank cells in that range.
Why does COUNTA return a different count from COUNTIF?
COUNTA counts cells containing formulas even if those formulas return an empty string. COUNTIF with the "<>" criterion generally excludes those results.
How do I count nonblank cells only when another column meets a condition?
Use COUNTIFS with both criteria. For example, =COUNTIFS(A1:A10,"<>",B1:B10,"Complete") counts rows with a nonblank value in column A and Complete in column B.
Are cells containing only spaces counted as nonblank?
Yes. A space is a character, so a cell containing only spaces is treated as nonblank by COUNTIF with the "<>" criterion.




