The direct answer: you can combine VLOOKUP and CONCATENATE (or the & operator) to build a lookup key from multiple cells, or to join the result of a VLOOKUP with other text. For example, =VLOOKUP(A2&B2, C:D, 2, FALSE) looks up a value made by concatenating A2 and B2, while =VLOOKUP(A2, C:D, 2, FALSE)&" - "&B2 appends text to the lookup result.
Why Combine VLOOKUP and Concatenation?
VLOOKUP normally searches for a single value in the first column of a table. But real data often stores a unique identifier across two columns — a first name and last name, a product code and a size, or a country and a region. Concatenation lets you create a composite key that matches a composite lookup value. This is useful when your data doesn’t have a single unique ID column and you need to pull information based on a combination of fields.
Another common use is formatting: you might want the result of a VLOOKUP to appear as part of a sentence, like "Product: "&VLOOKUP(A2, Products, 2, FALSE). Both uses are straightforward once you understand how Excel evaluates the formula.
How Concatenation Works in Excel
Excel offers two ways to join text: the CONCATENATE function and the ampersand (&) operator. CONCATENATE is older and limited to 255 arguments; CONCAT and TEXTJOIN are newer alternatives. The & operator is simpler and faster to type, and it’s what most examples use.
=CONCATENATE(A2, B2)— joins A2 and B2 with no separator.=A2&B2— same result, shorter syntax.=A2&" "&B2— adds a space between values.=TEXTJOIN(" ", TRUE, A2, B2)— joins with a delimiter, ignoring empty cells (Excel 2019+).
When you use concatenation inside VLOOKUP, the lookup value is calculated first, then VLOOKUP searches for that resulting string. The same applies to the lookup table’s first column — if that column contains concatenated values, you may need to create a helper column to match.
VLOOKUP with a Concatenated Lookup Value
Suppose you have a table with product codes in column A and sizes in column B, and you want to find the price for a specific code and size combination. The lookup table has the combined code and size in column E and the price in column F.
With the code in A2 and size in B2, the formula is:
=VLOOKUP(A2&B2, E:F, 2, FALSE)
This assumes column E contains values like “ABC123M” (code and size concatenated). If column E does not already have that combined value, you must create a helper column with =A2&B2 in each row, then use that column as the lookup range’s first column.
For a worked example: A2 = “ABC”, B2 = “M”, E2 = “ABCM”, F2 = 19.99. The formula returns 19.99. If the combined value doesn’t exist, VLOOKUP returns #N/A.
Using the Ampersand to Format the Result
You can also concatenate the result of VLOOKUP with other text. For instance, to show “Price: 19.99 USD” in a cell:
="Price: "&VLOOKUP(A2, E:F, 2, FALSE)&" USD"
This is useful for dashboards or reports where you want a readable label. Just be aware that the result is now text, not a number, so you cannot perform arithmetic on it directly without converting it back (e.g., with VALUE).
Common Problems and How to Fix Them
- #N/A error: The concatenated lookup value doesn’t match any entry in the first column of the table. Check for extra spaces, different text cases, or number formatting. Use
=TRIM(A2&B2)or=VLOOKUP(A2&B2, E:F, 2, FALSE)with exact match (FALSE) — but ensure the table’s first column is also trimmed. - Number vs. text mismatch: If A2 is a number, concatenating with & converts it to text. If the table’s first column stores numbers as numbers, the lookup fails. Use
=VLOOKUP(TEXT(A2,"0")&B2, E:F, 2, FALSE)or format the helper column as text. - Leading/trailing spaces: Use
=TRIM(A2)&TRIM(B2)to remove spaces before concatenating. - Case sensitivity: VLOOKUP is not case-sensitive, so “abc” matches “ABC”. If you need case-sensitive matching, use INDEX/MATCH with EXACT instead.
- Helper column required: If your lookup table doesn’t have a pre-concatenated column, you must add one. You cannot make VLOOKUP concatenate the table’s columns on the fly (that would require an array formula or XLOOKUP with a different approach).
Alternatives to VLOOKUP with Concatenation
Excel 365 and Excel 2021 offer XLOOKUP, which can handle a lookup value that is an array expression. For example, you can use =XLOOKUP(A2&B2, E:E&F:F, G:G) — this concatenates the entire E and F columns in memory and looks up the combined value, no helper column needed. This is cleaner and more dynamic.
Another option is INDEX/MATCH with an array formula: =INDEX(G:G, MATCH(A2&B2, E:E&F:F, 0)) — but this requires Ctrl+Shift+Enter in older versions, or it works natively in Excel 365.
For a single lookup, consider using the newer CONCAT function or TEXTJOIN to build the key. But for most users, the simple & operator is sufficient.
Frequently Asked Questions
Can I concatenate two columns inside VLOOKUP without a helper column?
In classic VLOOKUP, no — the table_array must be a contiguous range, and the first column must contain the exact lookup value. You need a helper column. However, with XLOOKUP or INDEX/MATCH using array concatenation, you can avoid the helper column in Excel 365.
Why does my VLOOKUP return #N/A even though the values look the same?
Most often it’s a formatting issue: numbers stored as text vs. numbers, or invisible spaces. Use =TRIM(A2&B2) and ensure the table’s first column is also trimmed. Also check that you’re using FALSE for exact match, not TRUE (approximate match).
What’s the difference between CONCATENATE and &?
Functionally, none for basic joining. & is shorter and faster to type. CONCATENATE is older and limited to 255 arguments; CONCAT (Excel 2016+) has no limit and can reference a range. TEXTJOIN adds delimiters and ignores empty cells.
Can I use VLOOKUP to return concatenated results from multiple columns?
VLOOKUP returns only one value from a single column. To return multiple columns, you’d need multiple VLOOKUPs or use INDEX/MATCH with an array. Alternatively, use XLOOKUP to return a range, then concatenate with TEXTJOIN.
Does VLOOKUP work with dates and times in concatenation?
Yes, but dates are stored as serial numbers. Concatenating a date with text will show the serial number (e.g., 45292) unless you format it with TEXT, like =TEXT(A2,"mm/dd/yyyy")&B2. Always use TEXT when you need a readable date in a concatenated key.
Is there a limit to how many characters I can concatenate?
Excel cells can hold up to 32,767 characters, but VLOOKUP’s lookup value is limited by that same cell limit. In practice, keep keys short for performance and to avoid errors. There’s no separate limit for the & operator.
Related
- Random Number SQL Server: RAND, NEWID, and CRYPT_GEN_RANDOM
- Windows + K Shortcut: What It Does and How to Use It
- Shortcut to Switch Off Computer: Fastest Ways
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Filter Excel Using a PivotTable: Practical Steps and TipsTo filter Excel data with a PivotTable, click inside the PivotTable, open the PivotTable Fields pane, and drag…
- Excel Formula for First Day of Month: ExamplesIf the date you want to use is in cell A2, enter =DATE(YEAR(A2),MONTH(A2),1) to return the first day…
- Excel: How to Filter a Table Based on a List of ValuesYes. In Excel for Microsoft 365, you can return only the rows in a table whose values appear…
- How to Put a Search Bar in an Excel Column and FilterTo search a column quickly, select a cell in your data and choose Data > Filter; open that…
- Add Workdays to a Date in Excel: Formula and ExamplesTo add workdays to a date in Excel, use =WORKDAY(A2,B2), where A2 contains the starting date and B2…
- Excel IF Formula Returns 0? Show a Blank Cell InsteadIf an Excel formula returns 0 and you want the cell to look blank, wrap the calculation in…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.