How to Use IF and MATCH Formulas to Match Multiple Values in Excel
Question details
The user needs a formula to evaluate a cell against multiple text strings (like specific assignment types) and return a specific value if a match is found, or an alternate value otherwise. The reference list needs to be easily expandable in the future.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Categorizing data rows by comparing a target cell against multiple acceptable criteria strings.
- Observed behavior
- The goal is to return 'Home' for specific assignment types (e.g., Short Term Assignment, Commuter Arrangement) and 'Host' for all other values, without creating an overly long, hard-to-maintain nested IF or OR statement.
Ensure you have an empty column or a separate sheet available where you can list all your reference values. A dedicated lookup range keeps your formulas clean and easy to update.
Use IF with ISNUMBER and MATCH for Expandable Criteria
Create a separate range for your matching values and check against it. This method is highly scalable and easier to maintain than nesting multiple OR conditions.
Instead of hardcoding every acceptable value inside an OR formula, you can place your acceptable values in a continuous range of cells. The MATCH function looks for your target cell's value inside this range. If it finds it, it returns a number; if not, it returns an error.
By wrapping the MATCH function inside ISNUMBER, you convert that result into a simple TRUE or FALSE, which the IF function can then use to return 'Home' or 'Host'.
In an empty area of your spreadsheet, such as cells A1 and A2, enter your valid assignment types: 'Short Term Assignment' in A1 and 'Commuter Arrangement (2015)' in A2.
Select the cell where you want the result to appear (for example, E3, evaluating data in D3). Type the following formula: =IF(ISNUMBER(MATCH(D3,$A$1:$A$2,0)),"Home","Host") and press Enter.
To add more assignment types later, simply type them into cells A3, A4, etc., and update the formula range reference to include the new cells, such as $A$1:$A$10.

Use IF and OR Functions for a Fixed Number of Conditions
If you only have two or three conditions and do not expect the list to grow, you can hardcode them directly into your formula using the OR function.
Easily Handle Complex Formulas in WPS Spreadsheet
WPS Spreadsheet provides a robust, user-friendly interface for handling logical functions like IF, OR, ISNUMBER, and MATCH. It helps you categorize and manage massive datasets efficiently without complicated setups.
- 1. Open your dataset: Launch WPS Spreadsheet and open the document containing your assignment data.
- 2. Set up your criteria: Create a dedicated reference range in an empty column for your valid assignment types.
- 3. Input the formula: Select the target cell, type the =IF(ISNUMBER(MATCH(...))) formula into the formula bar, and press Enter.
- 4. Drag to apply: Use the fill handle to apply the formula across all required rows in your dataset.

Frequently Asked Questions
Why is the MATCH function better than multiple OR conditions?
When you have many conditions, an OR formula becomes extremely long, repetitive, and hard to read. Using MATCH allows you to reference a separate list of cells. You can easily add, remove, or modify items from that list without ever needing to edit the formula itself.
What does the ISNUMBER function do in this formula?
The MATCH function returns the position number of a matched item (e.g., 1, 2), but returns an #N/A error if it doesn't find an exact match. ISNUMBER evaluates the result of MATCH: it returns TRUE if a number is generated (a match was found), and FALSE if it gets an error. The IF function then uses this TRUE/FALSE result to output 'Home' or 'Host'.
Can I name my reference range to make the formula simpler?
Yes! You can select your reference list (e.g., A1:A10), right-click, and choose 'Define Name' (e.g., 'AssignmentTypes'). Your formula then becomes much cleaner: =IF(ISNUMBER(MATCH(D3,AssignmentTypes,0)),"Home","Host").
Are these formulas compatible between Excel and WPS Spreadsheet?
Absolutely. Standard logical and lookup formulas like IF, OR, ISNUMBER, and MATCH are universally supported and work identically in both Microsoft Excel and WPS Spreadsheet.




