Formula Errors

Test TRUE, FALSE, and Zero Values in an Excel Formula

Natalie TaylorNatalie Taylor Nov 12, 2026 869 views

Question details

Correct an Excel formula so it recognizes Boolean FALSE and numeric 0 values rather than the text strings "FALSE" and "0".

Test TRUE, FALSE, and Zero Values in an Excel Formula
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants an IF formula to return False when cell H3 contains numeric zero or the Boolean value FALSE, and return True for other values.
Observed behavior
Comparisons written for text values do not correctly handle Boolean FALSE or numeric zero stored as actual values.
Before you start

Check whether H3 contains a real Boolean or number by selecting the cell and viewing the formula bar. Do not put quotation marks around TRUE, FALSE, or 0 unless the cell is intended to contain text.

Solution 1Recommended

Use OR and NOT to test zero and Boolean FALSE

Use this formula when H3 may contain either the numeric value 0 or the Boolean value FALSE.

Excel treats TRUE and FALSE as Boolean values and treats 0 as a number. The NOT function converts FALSE to TRUE for the OR test, allowing the formula to identify either condition.

1
Select the result cell

Click the cell where you want the True or False result to appear, such as I3.

2
Enter the Boolean-aware formula

Type =IF(OR(H3=0,NOT(H3)),"False","True") and press Enter.

3
Fill the formula if needed

Drag the fill handle from the result cell down the column to apply the H3 reference pattern to additional rows.

Use OR and NOT to test zero and Boolean FALSE
Expected result: The formula returns False when H3 is 0 or Boolean FALSE. It returns True for values that are not zero and are not FALSE.
Work with formulas in WPS Spreadsheets

Test Boolean FALSE and zero values with WPS Spreadsheets

WPS Spreadsheets supports familiar IF, OR, AND, and NOT functions, so you can use the same logic to distinguish Boolean values, numeric zero, and text values in your worksheet.

  1. 1. Open the workbook in WPS Spreadsheets: Launch WPS Office, select Spreadsheets, and open your .xlsx or .xls workbook.
  2. 2. Select the formula output cell: Click the cell where the evaluation result should be shown, such as I3.
  3. 3. Enter the formula: Type =IF(OR(H3=0,NOT(H3)),"False","True") in the formula bar and press Enter.
  4. 4. Apply it to other rows: Select the completed cell and drag its fill handle downward to copy the relative references.
Use IF, OR, AND, and NOT formulas to evaluate FALSE and 0 correctly.Open and edit Microsoft Excel .xlsx and .xls workbooks with formula compatibility.Review formulas directly in the formula bar before applying them to a range.Use a familiar spreadsheet interface for quick formula editing and filling.
microsoft office alternative - wps office

Frequently Asked Questions

Why does H3="FALSE" not work when the cell shows FALSE?

H3="FALSE" checks for the text string FALSE. If H3 contains the Boolean value FALSE, use NOT(H3), H3=FALSE, or a formula such as =IF(OR(H3=0,NOT(H3)),"False","True").

Should zero be enclosed in quotation marks in an Excel formula?

No. Use H3=0 when testing a numeric zero. Use H3="0" only when the cell contains the character 0 stored as text.

What does NOT(H3) return when H3 is FALSE?

NOT(H3) returns TRUE when H3 is the Boolean value FALSE. This lets OR(H3=0,NOT(H3)) identify FALSE along with numeric zero.

Can I use AND instead of OR and NOT for this test?

Yes. Use =IF(AND(H3<>0,H3),"True","False") to return True only when H3 is nonzero and evaluates as TRUE.

How can I tell whether a worksheet value is text or a Boolean value?

Select the cell and inspect the formula bar. A Boolean value appears as TRUE or FALSE without quotation marks, while imported text may be left-aligned, prefixed with an apostrophe, or require text comparisons in formulas.