Fix Excel IFS Function Returns Error When No Condition Matches
Question details
The user needs to prevent the IFS function from returning an error when none of the defined logical tests evaluate to TRUE.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Using the IFS function to evaluate a series of conditions and return corresponding values for a dataset.
- Observed behavior
- The formula returns an #N/A error because the data does not match any of the specified conditions, and no default fallback value was provided.
Review your existing IFS formula logic to ensure it is correct, and decide on a default value or message (like 'Not Found' or '0') you want to display for unmatched data.
Add a Final TRUE Condition (Recommended)
The most efficient way to handle unmatched conditions in an IFS function is to set the last logical test to TRUE. This acts as a default 'else' statement that catches anything not matched by previous conditions.
By design, the IFS function evaluates conditions in order and stops at the first TRUE result. If it reaches the end without finding a TRUE condition, it returns an #N/A error. By manually placing TRUE at the very end, you guarantee a match for any leftover values.
Click on the cell containing the IFS formula that is currently returning an error.
Click into the formula bar at the top of your workspace to edit the existing function.
At the end of your IFS arguments (before the closing parenthesis), type TRUE followed by a comma, and then enter your desired default value. Your formula should look like this: =IFS(condition1, result1, condition2, result2, TRUE, "No match").
Press Enter to apply the updated formula and drag the fill handle down to apply it to the rest of your column.

Wrap the Formula in an IFERROR Function
If you want to catch any type of error (including incorrect data types or calculation errors) alongside unmatched conditions, you can enclose the entire IFS function inside an IFERROR function.
Easily Manage Complex Formulas with WPS Spreadsheet
WPS Spreadsheet fully supports the IFS function and offers a highly intuitive formula bar to help you build, evaluate, and troubleshoot complex data logic without hassle.
- 1. Open your file in WPS: Launch WPS Spreadsheet and open your existing workbook containing the data.
- 2. Insert the IFS function: Navigate to the Formulas tab, click 'Insert Function', and select IFS from the list.
- 3. Build your conditions: Use the pop-up dialogue box to input your logical tests and results step-by-step. For the final test, simply type TRUE and your desired default result.
- 4. Confirm and apply: Click OK. The formula will be instantly applied, safely catching all unmatched data.

Frequently Asked Questions
Why does my IFS formula show #N/A?
The #N/A error appears in an IFS formula when the data being evaluated does not meet any of the logical tests you specified. Because the formula doesn't know what to do with the unmatched value, it returns an error. Adding a final TRUE condition with a default result solves this.
Can I use nested IF functions instead of IFS?
Yes. If you are using an older version of Excel that does not support the IFS function, you can use nested IF functions. In a nested IF structure, the final 'value_if_false' argument automatically serves as the default fallback for unmatched conditions.
Is the IFS function available in WPS Spreadsheet?
Yes, WPS Spreadsheet fully supports the IFS function as well as all other modern logical functions found in Microsoft Excel, ensuring total compatibility when you share or transfer your files.




