The direct answer is that VLOOKUP cannot return values from multiple columns in one formula; you must write a separate VLOOKUP for each column you want to retrieve, using the same lookup value and table array but a different column index number. For example, to pull both name and department from a table, you write two formulas: =VLOOKUP(A2, $E$2:$G$100, 2, FALSE) and =VLOOKUP(A2, $E$2:$G$100, 3, FALSE).
Why VLOOKUP Only Returns One Column
VLOOKUP is designed to search for a value in the first column of a table and then return a value from a single column you specify via the col_index_num argument. That argument is a single number, so the function inherently returns one cell value. If you need data from several columns, you have three practical options: write multiple VLOOKUP formulas, use the XLOOKUP function (available in Excel 2021 and Microsoft 365) which can return an entire row or array with one formula, or use INDEX and MATCH together. Each approach has trade-offs in simplicity, performance, and compatibility with older Excel versions.
The Multiple VLOOKUP Formula Approach
This is the classic method. Suppose you have a lookup table in columns E through G: employee ID in E, name in F, department in G. You want to fill columns B and C in another sheet with the name and department for each ID in column A. The formulas would be:
- B2:
=VLOOKUP($A2, $E$2:$G$100, 2, FALSE) - C2:
=VLOOKUP($A2, $E$2:$G$100, 3, FALSE)
Copy both down. The $ locks the table array so it doesn’t shift when you copy. The FALSE ensures an exact match. This works in every Excel version, but it recalculates twice for each row, which can slow down very large workbooks. Also, if you later insert a column in the table, you must manually update the column index numbers.
Using XLOOKUP to Return Multiple Columns at Once
If you have Excel 2021 or Microsoft 365, XLOOKUP can return a whole row or column of values with a single formula. The syntax is =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]). To return both name and department, you would use:
With employee ID in A2, lookup table in E2:G100, and wanting name and department (columns F and G), the formula in B2 is:
=XLOOKUP($A2, $E$2:$E$100, $F$2:$G$100)
This returns two adjacent cells, so it spills into B2 and C2 automatically (if you have dynamic array Excel). If you want them in separate columns, just ensure the return array is a range with the same number of columns as you need. XLOOKUP also handles missing values gracefully with the optional if_not_found argument, and it doesn’t require the lookup column to be the first column of the return range. On Mac, XLOOKUP works the same; just be aware that dynamic arrays require Excel 365 or 2021 on either platform.
INDEX and MATCH as a Flexible Alternative
INDEX and MATCH can also pull multiple columns, and it works in all Excel versions. The pattern is =INDEX(return_range, MATCH(lookup_value, lookup_range, 0)). To get the name from column F based on ID in E, you write:
=INDEX($F$2:$F$100, MATCH($A2, $E$2:$E$100, 0))
For department, change the return range to $G$2:$G$100. This is more flexible than VLOOKUP because the lookup range can be anywhere, and it doesn’t break if you insert columns. However, it still requires one formula per column unless you use array formulas (in older Excel, you’d need to press Ctrl+Shift+Enter to return an array). In Excel 365, you can combine INDEX with SEQUENCE to return multiple columns, but that’s more advanced.
How to Choose Which Method to Use
Your choice depends on your Excel version and your needs:
- Excel 365 or 2021: Use XLOOKUP for simplicity and dynamic arrays. It’s the most readable and maintainable.
- Older Excel (2019 or earlier): Use multiple VLOOKUP formulas or INDEX/MATCH. If you need to return many columns, INDEX/MATCH with a helper column might be easier to update.
- Very large datasets: Multiple VLOOKUPs can be slow. Consider using a single INDEX/MATCH with an array formula (if you’re comfortable with CSE) or upgrading to XLOOKUP.
- When columns are not adjacent: XLOOKUP can return a non-contiguous array only if you use the return_array as a union of ranges, but that’s tricky; multiple formulas are simpler.
Always test with a small sample to ensure your column index numbers are correct before applying to thousands of rows.
Common Problems and Fixes
Here are frequent issues when trying to VLOOKUP multiple columns:
- #N/A errors: Usually means the lookup value isn’t in the first column of the table, or there’s a formatting mismatch (e.g., text vs. number). Use
=VLOOKUP(A2, E:G, 2, FALSE)but ensure E is the first column of the range. - Wrong column data: If you copy a formula and the column index doesn’t change as expected, you might have omitted the
$on the table array. Always lock the table range with$. - Spill errors with XLOOKUP: If you use XLOOKUP to return multiple columns, make sure the target cells are empty; otherwise, you’ll get a #SPILL! error.
- Inserting columns breaks VLOOKUP: Adding a column in the table shifts the column index, so VLOOKUP returns the wrong data. Use INDEX/MATCH or XLOOKUP to avoid this.
Frequently Asked Questions
Can I use VLOOKUP to return multiple columns with one formula?
No, VLOOKUP only returns one column per formula. You must write separate formulas for each column, or use XLOOKUP (Excel 365/2021) which can return an array of multiple columns at once.
What is the best way to look up multiple columns in Excel?
For most users on Excel 365, XLOOKUP is the best because it’s simple and returns multiple columns with one formula. For older Excel, use multiple VLOOKUPs or INDEX/MATCH. The choice depends on your version and comfort level.
Why does my VLOOKUP return the wrong column after I add a new column?
Because VLOOKUP uses a column index number that you specify. When you insert a column, the index numbers shift, so the formula now points to a different column. Use INDEX/MATCH or XLOOKUP, which reference column ranges directly, to avoid this issue.
Can VLOOKUP return values from a column to the left of the lookup column?
No, VLOOKUP only looks to the right. If you need to return values from the left, use INDEX/MATCH or XLOOKUP. For example, to return ID (column E) based on name (column F), you’d use =INDEX($E$2:$E$100, MATCH($B2, $F$2:$F$100, 0)).
Is there a way to VLOOKUP multiple columns without repeating the formula?
Yes, with XLOOKUP in Excel 365, you can return a range of columns in one formula. Alternatively, you can use an array formula with INDEX/MATCH (press Ctrl+Shift+Enter in older versions) to return multiple values, but it’s less intuitive.
Related
- Shortcut for Going Back? Browser & App Shortcuts
- C Program to Generate a Random Number
- Data Entry Tools and Software: A Complete Guide
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- MySQL String Aggregate Functions: GROUP_CONCAT ExplainedMySQL’s primary string aggregate function is GROUP_CONCAT(), which concatenates values from multiple rows into a single string. For…
- Calculate Number of Years in Excel: Dates and FormulasTo calculate the number of complete years between two dates in Excel, enter the earlier date in A2…
- Excel: Merge Date and Time Cells Into One Cell With FormulaTo combine a date in A2 and a time in B2 into one Excel date-and-time value, enter =A2+B2…
- How to Filter Blank Cells in Excel and Find Empty RowsTo filter blank cells in Excel, turn on filtering for your data, open the dropdown in the column…
- Excel Let Text Overflow? What Happens to Cell TextYes. In Excel for Microsoft 365 on Windows, text can extend visually past a cell’s right edge when…
- VLOOKUP to the Left: How to Look Up Values to the LeftYou cannot make VLOOKUP look to the left. VLOOKUP only searches the first column of a table and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.