Function Problems

WPS Spreadsheet: Count Cells with Values Excluding Empty IF Results

Jason MillerJason Miller Nov 12, 2026 869 views

Question details

The user needs to count cells that display values while excluding formulas that return an empty string.

Product
WPS Spreadsheet
Device & OS
not provided
Scenario
A worksheet contains formulas such as IF formulas that return "", and the user wants an accurate count of visibly populated cells.
Observed behavior
COUNTA includes cells containing formulas that return an empty string, producing a higher count than the number of visible values.
Before you start

Identify the exact range to count, such as A2:A100, and check whether the cells contain formulas returning "" or actual blank cells. Also check for values containing only spaces, because spaces are not empty strings.

Solution 1Recommended

Use COUNTIF to exclude empty string results

Use this method when the range contains formulas that return "" and you want to count cells with non-empty displayed results.

COUNTIF with the "<>" criterion counts cells that are not empty and excludes formula results that display as an empty string.

1
Select the result cell

Click the cell where you want the count to appear.

2
Enter the COUNTIF formula

Type =COUNTIF(A2:A100,"<>") and replace A2:A100 with the range you need to evaluate.

3
Confirm the formula

Press Enter. WPS Spreadsheet returns the count of cells with non-empty results and excludes formulas that return "".

Empty strings are excluded: COUNTIF(A2:A100,"<>") is generally the clearest option when the range contains IF formulas that return empty strings.

Count Non-Empty Formula Results in WPS Spreadsheet

WPS Spreadsheet provides COUNTIF, COUNT, and SUMPRODUCT functions to count displayed values accurately while handling formulas that return empty strings. Its familiar spreadsheet interface makes it easy to edit the range and verify the result.

  1. 1. Open the worksheet: Launch WPS Office, open your spreadsheet, and locate the range containing the formulas.
  2. 2. Choose a result cell: Click an empty cell where the count should appear.
  3. 3. Enter the appropriate formula: Use =COUNTIF(A2:A100,"<>") for all non-empty results, =COUNT(A2:A100) for numbers only, or =SUMPRODUCT(--(LEN(A2:A100)>0)) when testing visible characters.
  4. 4. Confirm and check the count: Press Enter and compare the result with the visibly populated cells in the selected range.
Exclude IF formulas that return empty strings with COUNTIFChoose COUNT for numeric-only results or LEN for visible text and numbersOpen, edit, and save Microsoft Excel .xlsx files with strong format compatibilityUse a familiar, lightweight spreadsheet interface for formula-based analysis
microsoft office alternative - wps office

Frequently Asked Questions

Why does COUNTA count cells that appear empty?

COUNTA counts a cell when it contains a formula, even if that formula returns an empty string such as "". Use COUNTIF(range,"<>") to exclude those displayed-empty results.

What formula counts only numeric values in WPS Spreadsheet?

Use =COUNT(A2:A100), replacing the range with your data range. COUNT ignores text, blank cells, and formulas that return empty strings.

How can I count both text and numbers but exclude empty IF results?

Use =COUNTIF(A2:A100,"<>") for standard non-empty results. If you need to test the displayed length explicitly, use =SUMPRODUCT(--(LEN(A2:A100)>0)).

Why does my count still include cells that look blank?

The cells may contain spaces or other invisible characters. COUNTIF can treat such cells as non-empty, so clean the source data or use a formula that removes spaces before testing the length.