logo
search
Formula Errors

How to Create an Excel IF Formula for Multiple Combined Text Values

John WilsonJohn Wilson Oct 23, 2026 868 views

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.

How to Create an Excel IF Formula for Multiple Combined Text Values
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the target cell

Click on the blank cell where you want the resulting text to be displayed.

2
Enter the nested IF formula

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.

3
Apply the formula

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.

Use a Nested IF Function to Return Custom Text Results
Formula Execution Order: This formula checks for 'Orange' first. If false, it checks for 'Apple+Orange'. If both are false, it defaults to 'apple' for any other value, including 'Apple'.
Advanced Spreadsheet Formula Support

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. 1. Install WPS Office: Download and install WPS Office Free on your computer or mobile device.
  2. 2. Open your data file: Launch WPS Spreadsheet and open your existing workbook containing the text data.
  3. 3. Insert the function: Click on a blank cell, type '=' and use the formula prompts to start entering your IF formula.
  4. 4. Complete and drag: Finish the logical conditions, press Enter, and drag the fill handle to apply the logic to all relevant rows.
100% compatible with Microsoft Excel formulas, ensuring your nested IF and OR functions work seamlessly.Smart auto-complete feature provides syntax hints to prevent logical errors while building formulas.Free, lightweight, and fast office suite available for Windows, Mac, and Linux.
microsoft office alternative - wps office

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.