Test TRUE, FALSE, and Zero Values in an Excel Formula
Question details
Correct an Excel formula so it recognizes Boolean FALSE and numeric 0 values rather than the text strings "FALSE" and "0".

- 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.
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.
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.
Click the cell where you want the True or False result to appear, such as I3.
Type =IF(OR(H3=0,NOT(H3)),"False","True") and press Enter.
Drag the fill handle from the result cell down the column to apply the H3 reference pattern to additional rows.

Use a shorter AND formula for the same result
Use this equivalent formula when you prefer to test the positive condition that H3 is nonzero and TRUE.
Use explicit comparisons when the values are stored as text
Use this method only if H3 contains the literal text FALSE or 0, rather than Boolean or numeric values.
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. Open the workbook in WPS Spreadsheets: Launch WPS Office, select Spreadsheets, and open your .xlsx or .xls workbook.
- 2. Select the formula output cell: Click the cell where the evaluation result should be shown, such as I3.
- 3. Enter the formula: Type =IF(OR(H3=0,NOT(H3)),"False","True") in the formula bar and press Enter.
- 4. Apply it to other rows: Select the completed cell and drag its fill handle downward to copy the relative references.

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.




