How to Fix an Excel IFS Formula with Multiple Text Conditions
Question details
The user needs to create or fix an Excel IFS formula that checks multiple text conditions in priority order and returns a default value if none are met.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Building an advanced IFS function to evaluate text strings, prioritize specific prefixes (e.g., '1', 'PE', 'PO'), and assign a default 'TBD' result.
- Observed behavior
- The goal is to evaluate conditions from left to right, returning the value of the first matching cell, while avoiding errors if initial cells contain #N/A.
Ensure you are using a version of Excel or WPS Spreadsheet that supports the IFS function (Office 2019/365 or WPS Office 2019 and newer). Verify your cell references to avoid unexpected #N/A errors.
Construct the IFS Formula with IFNA and a Default Condition
Use a combination of IFS, LEFT, and IFNA to sequentially evaluate text conditions and provide a default fallback.
The IFS function evaluates multiple conditions in the exact order they are written (left to right). Once it finds the first TRUE condition, it stops and returns the corresponding value.
To ensure a default value ('TBD') is returned when no specific conditions match, use 'TRUE' as the final logical test. Additionally, wrapping references in IFNA prevents existing cell errors from breaking the entire formula calculation.
Set the first logical test to check if the code begins with '1'. Use `=IFS(LEFT(IFNA(B2,2),1)="1", B2...` to extract the first character while preventing `#N/A` errors.
Append the next checks for 'PE' and 'PO'. Add `..., LEFT(C2,2)="PE", C2, LEFT(D2,2)="PO", D2...` to evaluate columns C and D in priority order.
End the formula with a catch-all condition. Add `..., TRUE, "TBD")` so that if B2, C2, and D2 do not meet any of the criteria, the cell correctly displays 'TBD'.
The final formula should be `=IFS(LEFT(IFNA(B2,2),1)="1",B2,LEFT(C2,2)="PE",C2,LEFT(D2,2)="PO",D2,TRUE,"TBD")`. Press Enter and drag the fill handle down to apply it to your dataset.

Easily Manage Complex Formulas in WPS Spreadsheet
WPS Spreadsheet fully supports advanced logical functions like IFS, IFNA, and LEFT. With a built-in formula evaluation tool and error checking, managing complex data criteria is straightforward and completely free.
- 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open the workbook containing the text data you need to evaluate.
- 2. Enter the IFS formula: Select the target cell, click the formula bar, and type your IFS formula using the syntax described above.
- 3. Use Formula Error Checking: If you encounter an unexpected result, navigate to the Formulas tab on the ribbon and click 'Evaluate Formula' to see exactly how WPS calculates each step.

Frequently Asked Questions
Why is my IFS formula returning an #N/A error?
An #N/A error in an IFS formula typically means that none of the specified conditions were met, and no default 'TRUE' condition was provided at the end of the formula. Always add `TRUE, "Your Default Value"` as the final argument to act as a catch-all.
Can I use multiple conditions for the same output in an IFS function?
Yes, but IFS does not support 'OR' logic intrinsically in a single condition argument unless you nest an OR function. You can write it as `=IFS(OR(A1="PE", A1="PO"), "Matched", TRUE, "TBD")` to check multiple text criteria at once.
Is the IFS function available in older versions of Excel?
No, the IFS function was introduced in Excel 2019 and Office 365. If you are using Excel 2016 or earlier, you must use nested IF functions instead. Alternatively, modern software like WPS Office fully supports the IFS function for free.
How does the IFNA function help in this formula?
The IFNA function prevents existing `#N/A` errors in the referenced cells (like column B) from cascading and causing the entire IFS formula to break. It temporarily replaces the `#N/A` with a safe value (like '2') so the LEFT function can still process without returning an error.




