Look up values in a table with Excel's three main lookup functions. You will see when to use VLOOKUP for vertical lists, HLOOKUP for horizontal lists and XLOOKUP for either direction. It suits beginners who know basic cell references and have Excel 365 or 2021 for XLOOKUP.
YouTube video: How to Use VLOOKUP, HLOOKUP, XLOOKUP || Detailed Explaination with examples || Advance Excel Formula
Caption availability is unknown. Check the CC control in the YouTube player.
- Video length
- 9 min 27 s
- Time to do it
- 15 minutes
- Difficulty
- Easy
- Steps
- 9
What you need
Steps
Set up a small table with a unique ID in the first column, such as product codes, and the values you want to return in the columns to the right.
Click an empty cell and type =VLOOKUP(lookup_value, table_array, col_index_num, FALSE). Replace lookup_value with the cell holding the ID you search for.
For table_array, select the whole table including the ID column. Lock it with F4 so the range does not shift when you copy the formula down.
Set col_index_num to the column number you want back, counting the ID column as 1. Use FALSE so Excel demands an exact match.
Press Enter. If you see #N/A, the ID is not in the table or the range is wrong. Check for extra spaces in the ID cells.
Use HLOOKUP when your IDs run across the top row instead of down a column. Type =HLOOKUP(lookup_value, table_array, row_index_num, FALSE).
For XLOOKUP, type =XLOOKUP(lookup_value, lookup_array, return_array). Point lookup_array at the ID column and return_array at the column of results.
Add a fourth argument to XLOOKUP for a custom not-found message, like "Not found", and a fifth argument 0 for an exact match.
Copy the formula down or across with the fill handle. Confirm each result matches the source row before you rely on it.
Tips and common mistakes
VLOOKUP only looks to the right of the ID column, so move the ID column to the left or switch to XLOOKUP.
Always use FALSE or 0 for exact matches, or Excel may return a wrong nearby value.
XLOOKUP can search left or right and does not need column numbers, so it is easier to maintain.
Watch for numbers stored as text and stray spaces, the most common cause of #N/A errors.
Questions
What is the difference between VLOOKUP and XLOOKUP?
VLOOKUP searches only down the first column of a range and needs a column number. XLOOKUP searches any column or row and returns values from any matching range, in either direction.
Why does my VLOOKUP return #N/A?
The lookup value is not found exactly. Check for extra spaces, numbers saved as text, or a table range that does not include the ID column.
Can I use these formulas in older Excel versions?
VLOOKUP and HLOOKUP work in all modern versions. XLOOKUP needs Excel 365 or Excel 2021, so older copies will show a #NAME? error.
The notes are drafted automatically from video details and general task knowledge. How the guide was prepared
Report a correction


