Function Problems

Use INDEX and MATCH in Excel to Find a Rate by Trade and Shift

Steve KSteve K Dec 2, 2026 869 views

Question details

Find the rate that corresponds to both a trade and a day or night shift in a rate table.

Use INDEX and MATCH in Excel to Find a Rate by Trade and Shift
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains a trade and shift for each row, while a separate rate table lists rates by trade and shift.
Observed behavior
The desired result is the rate at the intersection of the matching trade row and shift column.
Before you start

Check that the rate table has trades in A2:A18, shift headers in B1:C1, and rates in B2:C18. On the lookup sheet, confirm that C2 contains the trade and E2 contains the shift, and adjust the references if your layout differs.

Solution 1Recommended

Use a Two-Way INDEX and MATCH Formula

Use this formula to match the trade row and shift column and return their intersecting rate.

The first MATCH finds the trade within the rate table, and the second finds the shift header. INDEX returns the rate where those positions intersect.

1
Select the result cell

On the worksheet containing the trade in C2 and shift in E2, click the cell where you want to display the rate.

2
Enter the formula

In the selected cell, enter =INDEX('Table of Rates'!$B$2:$C$18,MATCH($C2,'Table of Rates'!$A$2:$A$18,0),MATCH($E2,'Table of Rates'!$B$1:$C$1,0)) and press Enter. Replace Table of Rates and the ranges if your rate table uses a different layout.

3
Fill the formula down

Drag the result cell's fill handle down to calculate rates for additional rows. The trade and shift row references will change while the rate-table ranges stay fixed.

Use a Two-Way INDEX and MATCH Formula
Check exact matches: Both MATCH functions use 0 for an exact match. If the formula returns #N/A, check that the trade and shift values match the table entries and headers, including spaces.
Work with rate tables in WPS Spreadsheets

Find Trade and Shift Rates in WPS Spreadsheets

Use the same two-way INDEX and MATCH formula in WPS Spreadsheets to return rates from a trade and shift table.

  1. 1. Open the workbook: In WPS Spreadsheets, open the workbook containing your lookup sheet and rate table.
  2. 2. Check the ranges: On the Table of Rates sheet, check that trades are in A2:A18, shift headers are in B1:C1, and rates are in B2:C18. Adjust the formula ranges if needed.
  3. 3. Enter the lookup formula: On the lookup sheet, select a result cell in row 2 and enter =INDEX('Table of Rates'!$B$2:$C$18,MATCH($C2,'Table of Rates'!$A$2:$A$18,0),MATCH($E2,'Table of Rates'!$B$1:$C$1,0)), then press Enter.
  4. 4. Apply it to other rows: Drag the result cell's fill handle down to return rates for the remaining trade and shift entries.
Look up rates using both trade and shift criteriaOpen and edit Microsoft Excel XLSX and XLS filesFill formulas down for multiple entriesUse spreadsheet tools in a familiar interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula return #N/A?

One of the MATCH functions could not find an exact match. Compare the trade in C2 with the trade list and the shift in E2 with the headers, including any leading or trailing spaces.

Can I use different columns for the trade and shift?

Yes. Replace $C2 and $E2 in the formula with the cells containing your trade and shift. Also update the rate-table ranges if your table is arranged differently.

What if my shift headers are in a different order?

The formula matches the shift header by name, so the order can differ. Make sure the header range B1:C1 aligns with the rate columns in B2:C18.

Can I copy the formula to other rows?

Yes. Drag the result cell's fill handle down. The row references for the trade and shift will update, while the dollar signs keep the rate-table ranges fixed.