Function Problems

Use INDEX and MATCH in WPS Spreadsheet to Return Duty and Location Values

Khadija KhanKhadija Khan Nov 12, 2026 869 views

Question details

Retrieve duty and location values in a log by matching each person's name and day against worksheet tables.

Use INDEX and MATCH in WPS Spreadsheet to Return Duty and Location Values
Product
WPS Spreadsheet
Device & OS
not provided
Scenario
The user wants a two-way lookup that finds the correct row by person name and the correct column by day, including data stored on another worksheet.
Observed behavior
The required result is the value at the intersection of the matched person row and matched day column.
Before you start

Check that the person names and day headers use the same text in both the log and source tables. Day names must match exactly, including spelling, spaces, and abbreviations such as "Mon" versus "Monday".

Solution 1Recommended

Use INDEX with two MATCH functions for a two-way lookup

Use this formula when names are listed down the first column of a table and days are arranged across the header row.

INDEX returns the value where the matched name row and matched day column intersect. Add the worksheet name before each source range when the lookup table is on another sheet.

1
Select the destination result cell

In the log worksheet, click the cell where the duty or location result should appear, such as the result cell on the same row as the person's name and selected day.

2
Enter the two-way lookup formula

Type a formula such as =INDEX(DutyTable!$B$8:$F$9,MATCH(D13,DutyTable!$A$8:$A$9,0),MATCH(B13,DutyTable!$B$7:$F$7,0)). Replace DutyTable with the source worksheet name and adjust the ranges to match your table.

3
Confirm the formula

Press Enter. The first MATCH finds the row containing the name in D13, and the second MATCH finds the day header matching B13.

4
Copy the formula for other log entries

Drag the fill handle from the result cell down or across the log. Keep the source table ranges absolute with $ signs so they do not shift while copying.

Use INDEX with two MATCH functions for a two-way lookup
Use a separate return range for each result type: To return a location instead of a duty, keep both MATCH functions the same and change only the INDEX return range or source worksheet to the location table.
WPS Spreadsheet formulas

Build Cross-Sheet INDEX and MATCH Lookups in WPS Spreadsheet

WPS Spreadsheet lets you create two-way INDEX and MATCH formulas to return duties, locations, schedules, and other values by matching a person and day across worksheets. Use familiar spreadsheet formula entry and fill tools to apply the lookup throughout your log.

  1. 1. Open the log workbook: Open the workbook in WPS Office and select the worksheet containing the person-and-day log.
  2. 2. Identify the source table ranges: On the source worksheet, identify the result range, the name column, and the day-header row to use in the INDEX and MATCH formula.
  3. 3. Insert the INDEX and MATCH formula: Click the destination cell and enter INDEX with one MATCH for the name row and one MATCH for the day column, using 0 for exact matches.
  4. 4. Verify a sample result: Press Enter and compare the returned duty or location with the matching row-and-column intersection in the source table.
  5. 5. Fill the formula through the log: Use the fill handle to copy the formula to additional rows while retaining absolute references for the source ranges.
Create two-way lookups using INDEX and MATCH for names and day headers.Reference tables stored on other WPS Spreadsheet worksheets.Open and edit Microsoft Excel .xlsx and .xls lookup workbooks with compatible formulas.Use a familiar spreadsheet interface to copy formulas across logs and schedules.
microsoft office alternative - wps office

Frequently Asked Questions

How do I return a value from a different worksheet with INDEX and MATCH?

Prefix each source range with the worksheet name, such as DutyTable!$B$8:$F$9. Use INDEX for the return table and two MATCH functions to find the correct name row and day column.

Why does my INDEX and MATCH formula return #N/A for a day?

The day in the log must exactly match a header in the source table. Check spelling, abbreviations, spaces, and whether one cell contains text while the other contains a date value.

Can I use the same formula to return both duty and location?

Yes. Keep the MATCH functions for the person and day unchanged, then replace the INDEX return range with the duty table range or location table range you want to return.

What does the 0 in MATCH mean?

The 0 argument tells MATCH to find an exact match. It is appropriate for matching a specific person name and a specific day header.

How do I copy the lookup formula without changing the table ranges?

Use absolute references for the source ranges, such as $B$8:$F$9, $A$8:$A$9, and $B$7:$F$7. Then drag the fill handle to copy the formula.