Function Problems

How to Create an Excel Lookup Formula for Multiple Criteria and Ranges

Amos GikundaAmos Gikunda Nov 10, 2026 869 views

Question details

The user needs an Excel formula to retrieve a specific price based on three criteria: manufacturer, a quantity falling within a min/max range, and the selected payment method.

Excel Lookup Formula for Manufacturer, Quantity, and Payment Method
Product
Microsoft Excel
Device & OS
not provided
Scenario
Calculating dynamic pricing from a structured data table using multiple lookup conditions.
Observed behavior
The user wants to return the correct pricing value from either a Cash or SAC column when the manufacturer matches and the quantity is between defined minimum and maximum bounds.
Before you start

Ensure your pricing data is organized into clear, separate columns for Manufacturer, Panel Min, Panel Max, Cash Price, and SAC Price without any merged cells.

Solution 1Recommended

Use an INDEX and MATCH Array Formula

This method uses boolean logic within the MATCH function to evaluate multiple conditions, including number ranges, and dynamically selects the return column based on the payment method.

By multiplying conditional statements together, Excel creates an array of 1s and 0s. The MATCH function then looks for the first row where all conditions evaluate to true (1).

1
Set up your data table

Organize your data in a range (e.g., A2:E7) with columns for Manufacturer, Panel Min, Panel Max, Cash Price, and SAC Price.

2
Define your input cells

Designate specific cells for your lookup criteria. For instance, use G2 for the target Manufacturer, G3 for the Quantity, and G4 for the Payment Method (Cash or SAC).

3
Input the array formula

Select the cell where you want the final price to appear and type the following formula: =INDEX(IF(G4="Cash",D2:D7,E2:E7),MATCH(1,(A2:A7=G2)*(G3>=B2:B7)*(G3<=C2:C7),0))

4
Submit the formula correctly

If you are using Microsoft 365 or modern WPS Office, press Enter. If you are using an older version of Excel, you must press Ctrl+Shift+Enter to evaluate it properly as an array formula.

Use an INDEX and MATCH Array Formula
Formula Explanation: The IF function determines which price column to pull from (Cash or SAC). The MATCH function multiplies boolean arrays to find the exact row where the manufacturer matches and the quantity falls between the Min and Max bounds.
Advanced Data Analysis

Handle Complex Lookups Easily with WPS Spreadsheet

WPS Spreadsheet fully supports advanced array formulas, XLOOKUP, and dynamic array functions like FILTER, making it incredibly easy to build complex pricing models and multi-criteria lookups.

  1. 1. Open your data file: Launch WPS Spreadsheet and open the workbook containing your pricing tables.
  2. 2. Select the target cell: Click on the cell where you want your dynamic price calculation to appear.
  3. 3. Enter your lookup formula: Type in your INDEX/MATCH, FILTER, or XLOOKUP formula exactly as you would in Microsoft Excel.
  4. 4. Make your selections: Change your criteria inputs (like Manufacturer or Quantity) and press Enter to see the calculations update instantly.
Fully compatible with Microsoft Excel formulas, functions, and the standard .xlsx format.Supports modern dynamic array functions like FILTER and XLOOKUP out of the box.Lightweight, fast, and completely free to use for everyday data analysis and complex logic.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my INDEX MATCH formula return a #VALUE! or #N/A error?

A #VALUE! error usually occurs in older Excel versions if you forget to press Ctrl+Shift+Enter to confirm an array formula. An #N/A error means no row in your data matched all the specified criteria (e.g., the inputted quantity falls outside all defined min/max ranges or the manufacturer is misspelled).

Can I use XLOOKUP for multiple criteria with number ranges?

Yes, you can use XLOOKUP by utilizing boolean logic in the lookup array. For example: =XLOOKUP(1, (A2:A7=G2)*(B2:B7<=G3)*(C2:C7>=G3), IF(G4="Cash", D2:D7, E2:E7)). This searches for the value '1' (True) across the combined condition arrays.

How do I handle missing data or prevent errors when no exact match is found?

If using the FILTER or XLOOKUP functions, you can utilize their built-in 'if_not_found' arguments to display a custom message. For older INDEX/MATCH formulas, wrap the entire formula in an IFERROR function, such as: =IFERROR(your_index_match_formula, "Price not found").