Ignore Blank Cells When Testing for Zero with an IF Formula in WPS Office Spreadsheets
Question details
The user needs an Excel IF formula in WPS Office Spreadsheets that returns YES only when at least one referenced cell actually contains the value 0, ignoring blank cells because spreadsheet comparisons treat blank cells as zero.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- The user is building a formula that checks multiple non-adjacent cells for a real zero value and wants blank cells to be ignored rather than counted as zero.
- Observed behavior
- With a plain comparison such as F2=0, blank referenced cells are treated as zero, causing the formula to return YES incorrectly when referenced cells are blank.
Open the worksheet in WPS Office Spreadsheets and identify the non-adjacent cells to test, such as F2, H2, J2, N2, O2, S2, U2, W2, Y2, AA2, and AC2. Confirm which result you want when a cell is blank versus when it contains a real zero.
Use AND(F2=0,F2<>"") Conditions Inside OR to Ignore Blank Cells
Use this method when your IF formula must check multiple non-adjacent cells and return YES only if at least one nonblank cell contains zero.
Excel and WPS Office Spreadsheets evaluate a blank referenced cell as 0 in a comparison such as F2=0. Adding the condition F2<>"" ensures the cell is not blank before the zero comparison is counted.
Wrap an AND condition for each referenced cell inside OR, and place that OR condition inside IF. If no referenced cell contains a real zero, the formula returns an empty string.
Click the cell where you want the IF formula result to appear, such as the cell in the same row beside your data.
Type =IF(OR(AND(F2=0,F2<>""),AND(H2=0,H2<>""),AND(J2=0,J2<>""),AND(N2=0,N2<>""),AND(O2=0,O2<>""),AND(S2=0,S2<>""),AND(U2=0,U2<>""),AND(W2=0,W2<>""),AND(Y2=0,Y2<>""),AND(AA2=0,AA2<>""),AND(AC2=0,AC2<>"")),"YES","") into the formula bar. Adjust the cell references to match your worksheet range.
Press Enter to apply the formula. The result shows YES only when at least one nonblank referenced cell contains zero; otherwise it remains blank.

Fix Zero-Test Formulas in WPS Office Spreadsheets by Ignoring Blank Cells
Create an IF formula in WPS Office Spreadsheets that combines AND and OR to test only nonblank cells for zero, so your YES result appears only when a referenced cell truly contains 0. WPS Office keeps Excel-compatible formula behavior while remaining free and lightweight.
- 1. Open your workbook: Launch WPS Office Spreadsheets and open the worksheet containing the cells you want to test for zero.
- 2. Select the result cell: Click the cell where you want YES or blank to appear.
- 3. Enter the corrected IF formula: In the formula bar, enter a formula such as =IF(OR(AND(F2=0,F2<>""),AND(H2=0,H2<>"")),"YES","") and add an AND condition for each referenced cell.
- 4. Press Enter: Press Enter to confirm the formula and review that blank cells are ignored while real zeros return YES.

Frequently Asked Questions
Why does Excel treat a blank cell as zero in my IF formula?
In spreadsheet comparisons, a blank cell has no value but evaluates as 0 in a numeric context. Add a nonblank condition such as F2<>"" to distinguish a blank cell from an actual zero.
Can I use this formula for non-adjacent cells in WPS Office?
Yes. Wrap each AND(F2=0,F2<>"") condition inside OR, and adjust the cell references in the formula bar to match the cells you want to test.
What result does the formula return if all referenced cells are blank or contain 1?
It returns an empty string, or blank, because no nonblank referenced cell contains zero and the IF condition is false.
Can I replace F2<>"" with ISBLANK(F2)?
Yes. You can use NOT(ISBLANK(F2)) or F2<>"" as a nonblank test. Either works, but F2<>"" is often shorter and easier to read in a long formula.




