How to Create an Excel IF Formula for Multiple Combined Text Values
Question details
The user needs an Excel formula to evaluate a cell's text and return specific strings based on exact text matches, assigning unique outputs for different text inputs and a default value for everything else.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Categorizing and standardizing text data by checking input values against predefined conditions to output exact text labels.
- Observed behavior
- The desired formula must automatically evaluate a cell's content and output 'orange' for 'Orange', 'appleorange' for 'Apple+Orange', and default to 'apple' for 'Apple' or any other unmatched inputs.
Identify the target cell containing the source text (e.g., cell A1) and finalize the exact text strings and default outputs you want the formula to return.
Use a Nested IF Function to Return Custom Text Results
Use this method when you need to output entirely specific, custom lowercase text results based on each matched condition.
A nested IF formula allows you to evaluate multiple logical tests in a specific order. Once a condition evaluates to true, the formula stops and returns the corresponding result. If no conditions are met, it returns the final default argument.
Click on the blank cell where you want the resulting text to be displayed.
Type the formula: =IF(A1="Orange","orange",IF(A1="Apple+Orange","appleorange","apple")) into the formula bar. Replace A1 with the actual cell reference of your source data.
Press the Enter key on your keyboard. Click on the cell again and drag the fill handle at the bottom-right corner downwards to apply the formula to the rest of your data column.

Combine IF and OR Functions to Preserve Original Text
Use this approach if you want to output the original cell value for specific conditions, and a default custom value for all other cases.
Master Nested IF Formulas Easily in WPS Spreadsheet
WPS Spreadsheet provides comprehensive support for complex logical functions like IF and OR. With intelligent formula auto-completion and full compatibility with Microsoft Excel syntax, processing conditional data is intuitive and error-free.
- 1. Install WPS Office: Download and install WPS Office Free on your computer or mobile device.
- 2. Open your data file: Launch WPS Spreadsheet and open your existing workbook containing the text data.
- 3. Insert the function: Click on a blank cell, type '=' and use the formula prompts to start entering your IF formula.
- 4. Complete and drag: Finish the logical conditions, press Enter, and drag the fill handle to apply the logic to all relevant rows.

Frequently Asked Questions
How many IF conditions can I nest in a single formula?
In modern versions of spreadsheet software, including Excel and WPS Spreadsheet, you can nest up to 64 IF functions in a single formula. However, for highly complex conditions with multiple text matches, using functions like IFS or VLOOKUP is generally easier to manage and troubleshoot.
Why is my IF formula returning a #NAME? error instead of the text?
A #NAME? error usually occurs when the text strings within the formula are not enclosed in double quotation marks. Ensure that all specific text values, such as "Apple" or "Orange", have quotes around them so the software recognizes them as text rather than named ranges.
Can I use the IFS function instead of nested IFs for this scenario?
Yes. If your software supports the newer IFS function, you can streamline the formula by writing: =IFS(A1="Orange","orange", A1="Apple+Orange","appleorange", TRUE,"apple"). The TRUE argument acts as the default fallback for any values not explicitly defined.




