How to Fix Excel IF and IFS Formulas Not Returning Zero
Question details
The user needs to correct a monthly cost formula using IF or IFS so that it correctly returns a zero when a referenced cell is blank or contains a zero, instead of continuing to calculate a cost.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating monthly costs based on funding dates, where specific reference cells might be blank or explicitly set to zero.
- Observed behavior
- The formula ignores the zero or blank values in the reference column and continues executing the cost calculation, resulting in an incorrect monthly amount instead of zero.
Ensure that the cells you are referencing are formatted as 'General' or 'Number' and do not contain hidden spaces, as this can affect how Excel evaluates zero and blank values in logical formulas.
Reorder Conditions in the IFS Function
The IFS function evaluates conditions in the order they are written. Placing the zero check first ensures the formula stops and returns zero before calculating other conditions.
Because the IFS function returns the result for the very first TRUE condition it encounters, prioritizing your zero or blank cell criteria is crucial. If the calculation logic is placed before the zero check, Excel will execute the calculation first.
Click on the cell containing the incorrect IFS formula that calculates your monthly cost.
Click into the formula bar and adjust the order of your arguments so the zero test is first. For example, type: =IFS($J5=0, 0, M$2>=$J5, $E5/12).
Press the Enter key to apply the corrected formula, then click and drag the fill handle at the bottom-right of the cell to update the remaining rows.

Use Nested IF and ISBLANK Functions
If you are using older versions of Excel or prefer standard IF statements, nesting IF with the ISBLANK function allows you to explicitly handle both empty cells and zeros.
Easily Manage IF and IFS Formulas with WPS Office
WPS Spreadsheets fully supports advanced logical functions, including IF, IFS, and ISBLANK. You can easily write and troubleshoot complex formulas to calculate your monthly costs accurately without paying for expensive software.
- 1. Open your file in WPS Spreadsheets: Launch WPS Office and open the spreadsheet containing your monthly cost data.
- 2. Select the calculation cell: Click on the cell where you want the cost formula to output the result.
- 3. Enter the prioritized IFS formula: Type the corrected formula, ensuring the zero check comes first: =IFS($J5=0, 0, M$2>=$J5, $E5/12).
- 4. Apply the fix: Press Enter to apply the formula and drag the fill handle down to apply the logic to all relevant rows.

Frequently Asked Questions
Why does Excel treat a blank cell as a zero in some formulas?
Excel's calculation engine often evaluates completely empty cells as zero during mathematical operations. However, logical functions like IF may not automatically equate them in all contexts. Using the ISBLANK function ensures blank cells are handled explicitly and accurately.
What is the difference between the IF and IFS functions?
The IF function evaluates a single logical condition and requires nested IF statements to test multiple conditions. The IFS function simplifies this by allowing you to test multiple conditions in a single continuous formula, returning a value for the first condition that evaluates to TRUE.
How do I hide zero values in my spreadsheet instead of deleting them?
You can hide zero values by going to File > Options > Advanced. Scroll down to the 'Display options for this worksheet' section, and uncheck the box labeled 'Show a zero in cells that have zero value'.




