Function Problems

Return the First-Column Value from a VLOOKUP Row in Excel

Ayan MasoodAyan Masood Dec 2, 2026 868 views

Question details

Return the first-column value from the row found by a VLOOKUP that searches one of two tables.

Return the First-Column Value from a VLOOKUP Row in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A cell determines which table to search, and the user needs the first-column value from the matched row.
Observed behavior
The desired result is the first-column value from the same row selected by the original lookup.
Before you start

Identify the lookup value, the cell that selects the table, both table ranges, and whether the original VLOOKUP uses an exact or approximate match. For an approximate match, sort the first column of each table in ascending order.

Solution 1Recommended

Use VLOOKUP to return the first column of the selected table

Use the same table selection and match mode as the original lookup, but set the return-column index to 1.

1
Identify the lookup inputs

Check the original formula for its lookup value, table ranges, and match mode. In this example, E2 is the lookup value, B2 selects the table, and the tables are A3:C10 and F3:H10.

2
Enter the formula

Select the cell for the result and enter =IF(B2="M",VLOOKUP(E2,$A$3:$C$10,1,TRUE),VLOOKUP(E2,$F$3:$H$10,1,TRUE)). Replace the example cells and ranges with those from your workbook.

3
Match the original lookup settings

Use TRUE only if the original lookup uses approximate matching and both first columns are sorted ascending. If it uses an exact match, change TRUE to FALSE in both VLOOKUP functions.

4
Check the result

Press Enter and compare the returned value with the first column of the row selected by the original formula. When B2 is M, the formula searches the first table; otherwise, it searches the second.

Use VLOOKUP to return the first column of the selected table
Exact and approximate results: With an exact match, the returned first-column value matches the lookup value. With an approximate match, it is the largest first-column value less than or equal to the lookup value. If the lookup value is smaller than the first entry, VLOOKUP returns #N/A.
Work with lookup formulas in WPS

Return the matched first-column value in WPS Spreadsheets

Open your workbook in WPS Spreadsheets and use IF with VLOOKUP to select a table and return the first-column value from the matched row.

  1. 1. Open your workbook: In WPS Spreadsheets, open the workbook containing the lookup value and both tables.
  2. 2. Select a result cell: Click the cell where you want to display the first-column value.
  3. 3. Enter the lookup formula: Enter =IF(B2="M",VLOOKUP(E2,$A$3:$C$10,1,TRUE),VLOOKUP(E2,$F$3:$H$10,1,TRUE)), replacing the example references with your own.
  4. 4. Verify the match: Press Enter and compare the result with the first column of the matched row. Use FALSE instead of TRUE in both lookups if your original formula uses exact matching.
Return values from either lookup table using a single formulaOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and a familiar interfaceWork with spreadsheets using the free WPS Office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula return the lookup value itself?

With FALSE for an exact match, VLOOKUP finds the lookup value in the table's first column. Returning column 1 therefore returns that same value.

How do I return the first-column value for an approximate match?

Set VLOOKUP's column index to 1 and its match argument to TRUE. Sort the lookup column in ascending order; the result is the largest value less than or equal to the lookup value.

Why am I getting #N/A?

For an exact match, check that the lookup value exists in the selected table's first column. For an approximate match, #N/A can occur when the lookup value is smaller than the first value in the sorted lookup column.

Can INDEX and MATCH return the first-column value instead?

Yes. For one table, use =INDEX(A3:A10,MATCH(E2,A3:A10,1)) for an approximate match on ascending data. Use 0 instead of 1 in MATCH for an exact match, and use IF to select between tables if needed.