Use INDEX and MATCH in Excel to Find a Rate by Trade and Shift
Question details
Find the rate that corresponds to both a trade and a day or night shift in a rate table.

- 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.
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.
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.
On the worksheet containing the trade in C2 and shift in E2, click the cell where you want to display the rate.
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.
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.

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. Open the workbook: In WPS Spreadsheets, open the workbook containing your lookup sheet and rate table.
- 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. 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. Apply it to other rows: Drag the result cell's fill handle down to return rates for the remaining trade and shift entries.

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.




