Function Problems

How to Perform a Two-Criteria Price Lookup by Rate and Job Number in Excel

Elise WilliamsElise Williams Nov 11, 2026 869 views

Question details

The user needs to retrieve an invoice price from a separate price list based on two distinct conditions: the selected rate type (e.g., day or night) and the specific job number.

How to Perform a Two-Criteria Price Lookup by Rate and Job Number in Excel
Product
Excel
Device & OS
not provided
Scenario
Setting up an automated invoice or billing sheet where the correct price must be dynamically fetched by matching both the job number and the time rate from a master price sheet.
Observed behavior
To accurately extract the corresponding price from the data range without returning standard Excel errors when a match is not found.
Before you start

Ensure that your master price list table is properly structured with separate columns for Rate, Job Number, and Price, and verify that both source ranges have the exact same number of rows.

Solution 1Recommended

Use INDEX and MATCH Array Formula

Combining INDEX, MATCH, and boolean logic is the most robust method for performing multi-criteria lookups in Excel.

This formula uses boolean logic within the MATCH function to evaluate multiple conditions simultaneously. By multiplying the two criteria arrays together, it creates an array of 1s and 0s. When both conditions are met (TRUE * TRUE), the result is 1. The MATCH function then searches for the number 1 to return the correct row number to the INDEX function.

1
Select the destination cell

Click on the cell in your invoice where you want the calculated price to appear.

2
Input the array formula

Type the formula: =IFNA(INDEX('Price Sheet'!$C$2:$C$21,MATCH(1,($G$3='Price Sheet'!$A$2:$A$21)*(B9='Price Sheet'!$B$2:$B$21),0)),""). Be sure to replace the cell references with your actual ranges. In this example, $G$3 is the rate criterion, B9 is the job number criterion, and column C contains the target prices.

3
Confirm the formula

If you are using an older version of Excel, you must press Ctrl+Shift+Enter to convert it into an array formula (curly braces will appear around it). In Microsoft 365 or newer versions, simply press Enter.

Use INDEX and MATCH Array Formula
Handling Missing Data Gracefully: The IFNA function wrapped around the main formula ensures that if the specific job number and rate combination isn't found in your price sheet, the cell will remain blank instead of displaying a distracting #N/A error.
Advanced Spreadsheets Made Easy

Perform Complex Data Lookups Effortlessly with WPS Spreadsheet

WPS Office Spreadsheet fully supports array formulas and advanced lookup functions like INDEX, MATCH, XLOOKUP, and IFNA. You can execute multiple-criteria lookups exactly as you would in Microsoft Excel, completely for free.

  1. 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open your invoice and price list files.
  2. 2. Input the multi-criteria formula: Select your destination cell and type the exact same INDEX and MATCH formula combining your Rate and Job Number criteria.
  3. 3. Calculate the result: Press Enter to execute the function. WPS Spreadsheet instantly processes the array logic and returns your correct invoice price.
100% compatible with Microsoft Excel formulas, functions, and formattingSeamlessly supports modern dynamic arrays and legacy Ctrl+Shift+Enter array formulasLightweight application that runs smoothly, even with large data setsClean, intuitive interface familiar to Excel users with zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Can I use XLOOKUP for two criteria instead of INDEX and MATCH?

Yes, if you have a newer version of Excel or use WPS Spreadsheet, you can use XLOOKUP with multiple criteria using boolean logic. The syntax looks like this: =XLOOKUP(1, (Criteria1Range=Criteria1) * (Criteria2Range=Criteria2), ReturnRange, ""). Many users find this more straightforward than the INDEX and MATCH combination.

Why is my formula returning a #VALUE! error?

A #VALUE! error typically occurs if the ranges for your criteria are not exactly the same size. Ensure that the ranges for the Rate column (e.g., A2:A21), Job Number column (B2:B21), and Price column (C2:C21) all have the exact same number of rows and starting/ending points.

Why do I need to press Ctrl+Shift+Enter in older versions?

Multiplying two arrays (like matching both the rate array and the job number array) creates an array operation. Older versions of Excel require the Ctrl+Shift+Enter keystroke to explicitly tell the program to evaluate the formula as an array. Modern spreadsheet programs, including newer Excel versions and WPS Office, handle these dynamic arrays automatically.