VLOOKUP cannot take more than one search key on its own, but you can get the same result by building a single combined key with a helper column or an array formula. The most reliable approach is to add a helper column that joins the two (or more) fields with a delimiter, then VLOOKUP against that column. If you cannot add a helper column, use an array formula with ARRAYFORMULA, IF, and VLOOKUP, or switch to XLOOKUP with concatenated ranges. This guide covers both methods, the exact formulas, and the mistakes that break them.

What You'll Need

  • A Google account with access to Google Sheets (desktop browser recommended; the mobile app supports formulas but editing long array formulas is easier on desktop).
  • A source table with at least two columns you want to match on (for example, First Name and Last Name, or Product and Region).
  • A lookup table with the same two columns plus the value you want to return.
  • Consistent data: no leading or trailing spaces, and the same capitalization if you plan to match case-sensitively.

Step-by-Step

  1. Open your sheet and identify the columns. Suppose your lookup table is on a sheet named Data, with First Name in column A, Last Name in column B, and Email in column C. Your search table is on a sheet named Search, with First Name in A2 and Last Name in B2. You want the email in C2.
  2. Add a helper column to the lookup table. On the Data sheet, click the header of the first empty column to the right of your data (for example, D1) and type Key. In D2, enter =A2&"|"&B2. The pipe character | is a delimiter that prevents accidental matches (for example, "Ann" + "Lee" vs "Annie" + "e"). Press Enter.
  3. Copy the helper formula down. Select D2, then drag the fill handle down to the last row of your data, or double-click the fill handle to autofill. Confirm the column shows combined values like Ann|Lee.
  4. Build the search key in the search sheet. On the Search sheet, in C2 (or any empty cell), enter =A2&"|"&B2. This produces the same combined key format as the helper column.
  5. Write the VLOOKUP. In D2, enter =VLOOKUP(C2, Data!D:C, 2, FALSE). The first argument is the combined key, the second is the range starting at the helper column, the third is the column index of the return value relative to the helper column (Email is one column to the right of D, so index 2), and FALSE forces an exact match.
  6. Test with a known record. Type a first and last name that you know exists in the lookup table. The formula should return the matching email. If it returns #N/A, check for extra spaces or mismatched capitalization.
  7. Use an array formula instead of a helper column (optional). If you cannot add a helper column, use this formula in the search sheet: =ARRAYFORMULA(VLOOKUP(A2:A&"|"&B2:B, {Data!A2:A&"|"&Data!B2:B, Data!C2:C}, 2, FALSE)). This builds the combined key on both sides inside the formula. The curly braces create a virtual two-column array: the first column is the combined key, the second is the return value.
  8. Handle multiple results (optional). If more than one row can match the same combined key, VLOOKUP returns only the first match. To return all matches, use FILTER instead: =FILTER(Data!C2:C, Data!A2:A=A2, Data!B2:B=B2). This returns every email where both conditions are true.
  9. Lock ranges if you plan to copy the formula. Press F4 (or Cmd+Shift+4 on Mac) after selecting a range to add dollar signs, for example Data!$D:$D. This prevents the range from shifting when you copy the formula down or across.
  10. Clean your data before relying on the result. Select your key columns and use Data > Trim whitespace if available in your version, or wrap the key in TRIM: =TRIM(A2)&"|"&TRIM(B2). Inconsistent spacing is the most common cause of #N/A in multi-key lookups.

Common Mistakes

  • Using a delimiter that appears in your data. If a name or product contains a pipe character, the combined key can collide. Choose a delimiter that does not appear in any field, such as a tilde ~ or a double pipe ||.
  • Forgetting FALSE in VLOOKUP. Omitting the fourth argument lets VLOOKUP use approximate match, which returns wrong results on unsorted data. Always include FALSE or 0 for exact match.
  • Mismatched column index. The index counts from the first column of the range you gave VLOOKUP, not from column A of the sheet. If your range starts at D, the return column is 2, not 3.
  • Helper column not filled down. If the helper formula stops partway, rows below the last filled cell return #N/A. Check that the helper column has a value for every row.
  • Extra spaces or non-breaking spaces. Copy-pasted data often contains trailing spaces or non-breaking spaces that TRIM does not remove. Use =TRIM(SUBSTITUTE(A2, CHAR(160), " ")) to clean non-breaking spaces.
  • Case sensitivity. VLOOKUP is not case-sensitive by default. If case matters, use a formula with EXACT or switch to XLOOKUP with a case-sensitive option if your version supports it.

Tips

  • Use XLOOKUP instead of VLOOKUP when available: =XLOOKUP(A2&"|"&B2, Data!A2:A&"|"&Data!B2:B, Data!C2:C, "Not found"). It handles multiple keys cleanly and lets you set a custom not-found message.
  • Name your helper column range (for example, KeyRange) to make formulas easier to read and maintain.
  • Keep the helper column at the far right of your data so inserting new columns does not break the column index.
  • If you need to match on three or more fields, chain them the same way: =A2&"|"&B2&"|"&C2. Just keep the delimiter consistent on both sides.
  • Use conditional formatting to highlight #N/A results so you can spot missing keys quickly.

Troubleshooting

If the formula returns #N/A, first confirm the combined key in the search sheet exactly matches the helper column value. Click each cell and compare in the formula bar; hidden spaces are invisible in the cell. Next, check that the lookup range includes the helper column and the return column. If you used an array formula, make sure the ranges in the curly braces are the same size; mismatched ranges cause #VALUE! or wrong results. If the formula returns the wrong value, check the column index and confirm the range starts at the helper column. If you see #REF!, the column index is larger than the number of columns in the range. If the helper column shows an error, fix that formula first; VLOOKUP cannot work if the key itself is broken. Finally, if the sheet was imported from Excel, check that the delimiter character was not altered during import.

Frequently Asked Questions

Can VLOOKUP search for two criteria at once?

Not directly. VLOOKUP accepts one search key. You combine the two criteria into one key using a helper column or an array formula, then look up that combined key.

Do I need a helper column?

No. You can use an ARRAYFORMULA with concatenated ranges, or XLOOKUP with concatenated ranges. A helper column is simpler to audit and less prone to range-size errors.

Why does my multi-key VLOOKUP return #N/A when the values look identical?

Almost always a hidden character: a trailing space, a non-breaking space, or different capitalization. Clean both sides with TRIM and SUBSTITUTE, and confirm the delimiter is identical in both formulas.

What delimiter should I use?

Use a character that does not appear in your data, such as a pipe |, a tilde ~, or a double pipe ||. Avoid commas and spaces, which commonly appear in names and addresses.

Can I return multiple matches for the same key?

VLOOKUP returns only the first match. Use FILTER with multiple conditions to return every matching row.

Does this work in the Google Sheets mobile app?

Yes, the formulas work, but editing long array formulas is easier on a desktop browser. The mobile app may wrap or truncate long formulas in the formula bar.