How to use VLOOKUP and XLOOKUP in Excel

Learn how to pull a value from a table using VLOOKUP, HLOOKUP and the newer XLOOKUP. It suits beginners who need exact or approximate matches for reports or exams. You need Excel with your data in a clean table and a column or row to search on.

YouTube video: Excel Lookup functions, explained: XLOOKUP / LOOKUP / VLOOKUP / HLOOKUP [IGCSE ICT 0417]

Caption availability is unknown. Check the CC control in the YouTube player.

15 chapters. Tap a step to jump to it.Chapters from the creator
Choose a chapter (15)
Video length
45 min 43 s
Time to do it
20 minutes
Difficulty
Easy
Steps
9

What you need

Steps

  1. Lay out your data so the value you search for sits in the first column of the table. Remove blank rows and merged cells so the lookup range is clean.

  2. Click the cell where the result should appear and type =VLOOKUP(. Excel will prompt for the lookup value first.

  3. Enter the value or cell to search for, then a comma. This is the key you want to match, such as a product code.

  4. Select the whole table range and add a comma. Lock it with F4 so the range does not shift when you copy the formula down.

  5. Type the column number that holds the answer, counting from the first column of your range. Add a comma.

  6. Type FALSE for an exact match and close the bracket. Press Enter to see the result.

  7. For a horizontal table, use =HLOOKUP( instead. Give the lookup value, the range, the row number and FALSE for an exact match.

  8. In Microsoft 365, try =XLOOKUP(. Enter the lookup value, the column to search, and the column to return, then close the bracket.

  9. Press Enter. If the formula returns several results, they spill into the cells below automatically.

Tips and common mistakes

VLOOKUP can only look to the right of the key column, so XLOOKUP is better when your answer column sits on the left.

Use FALSE for exact matches; TRUE or a missing argument gives approximate matches that can return wrong rows.

Lock the table range with F4 before copying the formula, or the references will slide and break.

If you see #N/A, check for trailing spaces or a value that is not in the table.

Questions

What is the difference between VLOOKUP and XLOOKUP?

VLOOKUP searches only the first column and counts columns to the right. XLOOKUP lets you pick any search column and any return column, and it defaults to an exact match.

Why does my VLOOKUP return #N/A?

The lookup value is not found in the first column of the range. Check for extra spaces, number stored as text, or a range that does not start at the key column.

Can I use these formulas across two workbooks?

Yes. Open both files and point the range at the other workbook. Keep both files open or the formula may show a full file path and fail.

The notes are drafted automatically from video details and general task knowledge. How the guide was prepared

Report a correction

More in Apps & Software

See all