Function Problems

How to Replace VLOOKUP with INDEX and MATCH in Excel Forms

Camila MilosovichCamila Milosovich Oct 22, 2026 871 views

Question details

The user needs a flexible Excel formula combining INDEX and MATCH to replace a VLOOKUP formula for an employee clock-in and clock-out tracking form.

How to Replace VLOOKUP with INDEX and MATCH in Excel Forms
Product
Microsoft Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Rebuilding an employee clock-in and clock-out tracking form that requires complex data lookups based on conditional logic.
Observed behavior
Looking for a working formula structure using INDEX and MATCH (or modern alternatives like XLOOKUP) to reliably fetch corresponding clock-out times based on employee clock-in records.
Before you start

Ensure your employee data is organized with clear column headers (e.g., Time, Action, Employee ID) and verify that you do not have merged cells within your lookup ranges.

Solution 1Recommended

Apply the INDEX and MATCH Formula Combination

Use a combination of IFERROR, IFS, INDEX, and MATCH functions to handle complex lookups where standard VLOOKUP functionality falls short.

While VLOOKUP only searches the first column of a range and returns a value to the right, INDEX and MATCH can look up data in any direction. When combined with IFS and IFERROR, it can handle conditional actions like distinguishing between Clock In and Clock Out events.

1
Select the target cell

Click on the cell where you want to display the matched result, such as the calculated clock-out time for a specific employee.

2
Enter the nested formula

Type the formula: =IFERROR(IFS(B2<>"Clock In","",INDEX(B3:B22,MATCH(C2,C3:C22,0))="Clock Out",INDEX(A3:A22,MATCH(C2,C3:C22,0))),"")

3
Adjust the cell references

Update the ranges based on your actual sheet: B3:B22 for the Action column, C2 for the target Employee ID, C3:C22 for the Employee ID lookup range, and A3:A22 for the return Time column.

4
Apply to multiple rows

Press Enter to calculate the formula, then click and drag the fill handle at the bottom-right corner of the cell to copy the formula down to other rows.

Apply the INDEX and MATCH Formula Combination
Formula Breakdown: The MATCH function finds the row number of the specific Employee ID, and the INDEX function uses that row number to fetch the corresponding value from the Time column. IFERROR ensures blank cells are returned instead of errors.
Advanced Formulas in WPS Spreadsheet

Manage Complex Data Lookups Easily with WPS Office

WPS Spreadsheet provides comprehensive support for all advanced data lookup formulas, including VLOOKUP, INDEX, MATCH, and the modern XLOOKUP function. You can easily manage complex employee attendance forms and large datasets seamlessly.

  1. 1. Open your data file: Launch WPS Spreadsheet and open your employee tracking form or dataset.
  2. 2. Access the Formula tab: Navigate to the 'Formulas' tab on the top ribbon and select 'Insert Function'.
  3. 3. Search for your function: Search for 'INDEX', 'MATCH', or 'XLOOKUP' in the function dialog box.
  4. 4. Follow the wizard: Use the intuitive formula wizard to select your lookup arrays and return arrays without typing them manually.
100% format compatibility with Microsoft Excel (.xlsx) filesNative support for modern functions including XLOOKUP and IFSBuilt-in function library with detailed syntax tooltips and wizardsLightweight, fast performance on large datasets, and completely free to use
microsoft office alternative - wps office

Frequently Asked Questions

Why use INDEX and MATCH instead of VLOOKUP?

INDEX and MATCH are more flexible than VLOOKUP. They allow you to look up values to the left of your lookup column, process faster on large datasets, and prevent your formulas from breaking if you insert or delete columns in your spreadsheet.

What does the 0 mean in the MATCH function syntax?

The 0 in the MATCH function syntax (e.g., MATCH(lookup_value, lookup_array, 0)) specifies an exact match type. It tells the function to find the first value that is exactly equal to your lookup value, rather than an approximate match.

Can I use XLOOKUP instead of INDEX and MATCH?

Yes, XLOOKUP is designed to replace both VLOOKUP and INDEX/MATCH. It is much simpler to write, defaults to exact matches automatically, and naturally supports looking up data in any direction.

Why does my INDEX MATCH formula return an #N/A error?

An #N/A error typically means the MATCH function could not find the lookup value in the lookup array. You should check for leading or trailing spaces in your text data, ensure the data types match (e.g., text vs. numbers), and verify that the lookup value actually exists in the selected range.