Google Sheets Tips

VLOOKUP with multiple criteria in Google Sheets: 5 ways

VLOOKUP searches for one key in one column. To look up by two or more criteria, join them into one key, in a helper column or in an array inside the formula, or use a function that takes several conditions: FILTER, XLOOKUP, or INDEX with MATCH. This guide shows each method on the same table, with the errors each one can produce.

Google Sheets TipsVadym Kramarenko9 min read

VLOOKUP with multiple criteria in Google Sheets: 5 ways

VLOOKUP searches for one key in the first column of a range. To look up by two criteria, such as a name and a department, join the criteria into one key, or use a function that accepts several conditions. For a table with names in B3:B10, departments in C3:C10, salaries in D3:D10 and the criteria in F3 and G3:

  • Helper column: =VLOOKUP(F3 & "|" & G3, $D$3:$E$10, 2, FALSE), on a column that joins name and department.
  • Array inside VLOOKUP: =ARRAYFORMULA(VLOOKUP(F3 & "|" & G3, {B3:B10 & "|" & C3:C10, D3:D10}, 2, FALSE))
  • FILTER: =FILTER(D3:D10, B3:B10 = F3, C3:C10 = G3)
  • XLOOKUP: =ARRAYFORMULA(XLOOKUP(F3 & "|" & G3, B3:B10 & "|" & C3:C10, D3:D10))
  • INDEX and MATCH: =INDEX(D3:D10, MATCH(1, (B3:B10 = F3) * (C3:C10 = G3), 0))

All five return the same salary. FILTER is the shortest and the only one that returns every match when there are several. The details and the traps of each follow.

Why VLOOKUP needs help

Why VLOOKUP needs help

=VLOOKUP(search_key, range, index, [is_sorted])

  • search_key: one value to look for.
  • range: the table; the key is searched in its first column.
  • index: the number of the column to return.
  • is_sorted: FALSE for an exact match.

There is one search key and one column to search, so “John Doe in Human Resources” cannot be asked directly. The basics of the function are in the guide to VLOOKUP.

1. Helper column

1. Helper column

Add a column to the table that joins the criteria, and search in it.

=B3 & "|" & C3

Google Sheets with employee name in column B, department in column C and a helper column D with the formula =B3 & “|” & C3 returning values such as John Doe|Human Resources

=VLOOKUP(G3 & "|" & H3, $D$3:$E$10, 2, FALSE)

Google Sheets with a VLOOKUP formula that joins the name in G3 and the department in H3 and searches the helper column, returning a salary of 923

The search key is built the same way as the helper values, with the same separator. The helper column has to be the first column of the lookup range, to the left of the value you want back.

The separator matters. Without it, “Ann” joined with “Abel” and “Anna” joined with “Bel” give the same key, “AnnAbel”. Use a character that cannot occur in the data, such as the vertical bar.

This is the most transparent method: the key is visible in the sheet, and when a lookup fails you can see why.

When the criteria are parts of one column

Sometimes the table already holds the combined value, such as a full name, and the criteria arrive in two cells. Then only the search key is joined:

=VLOOKUP(F3 & " " & G3, $B$3:$D$10, 3, FALSE)

Google Sheets with a table of full names, joining dates and salaries and a VLOOKUP formula that joins the first name in F3 and the last name in G3 with a space, returning 892

The Turning Point

OWOX Data Marts

See your first report built in real time. 15 minutes.

  1. Connect your data warehouse
  2. Pick your metrics
  3. Get a live Google Sheets report

In the time it takes to write a ticket. Then imagine never writing that ticket again.

Book a Demo

We'll use your actual use case

2. Array inside VLOOKUP, no helper column

2. Array inside VLOOKUP, no helper column

The joined column can be built inside the formula with curly braces: the first column of the array is the joined key, the second the values to return.

=ARRAYFORMULA(VLOOKUP(F3 & "|" & G3, {$B$3:$B$10 & "|" & $C$3:$C$10, $D$3:$D$10}, 2, FALSE))

ARRAYFORMULA is required, because the ranges are joined row by row; without it the formula returns #REF!. The sheet stays free of extra columns, at the price of a formula that is harder to read and to debug.

Do not use CHOOSE for this

A variant copied from Excel builds the same array with CHOOSE:

=ARRAYFORMULA(VLOOKUP(F3 & "|" & G3, CHOOSE({1, 2}, $B$3:$B$10 & "|" & $C$3:$C$10, $D$3:$D$10), 2, FALSE))

Google Sheets with a VLOOKUP formula over CHOOSE returning the salary 892 for John Doe in Human Resources, who is in the first row of the table

In our test in Google Sheets, CHOOSE with {1, 2} returned only the first row of the two ranges, so the lookup finds a match only when the row you need is the first one, as in the screenshot, and returns #N/A for every other row. Use the curly-brace array above.

Look to the left

The same curly braces solve another limit of VLOOKUP, that it can only return columns to the right of the key. Put the columns into the array in the order you need:

=VLOOKUP("Sarah Wilson", {C3:C10, B3:B10}, 2, FALSE)

Google Sheets with employee IDs in column B and names in column C and a VLOOKUP over the array of C3:C10 and B3:B10 returning the ID 106-KL for Sarah Wilson

3. FILTER

3. FILTER

FILTER takes any number of conditions, and a row must meet all of them:

=FILTER(D3:D10, B3:B10 = F3, C3:C10 = G3)

There is nothing to join and no separator to choose. If several rows match, FILTER returns all of them, one under another, where VLOOKUP would silently return the first. To take only the first match, wrap it in INDEX: =INDEX(FILTER(D3:D10, B3:B10 = F3, C3:C10 = G3), 1).

Conditions are not limited to “equals”: C3:C10 = G3, D3:D10 > 500 works as well. When no row matches, FILTER returns #N/A; wrap it in IFNA to show a text.

4. XLOOKUP

4. XLOOKUP

XLOOKUP takes the search range and the result range separately, so the joined key does not need an array with two columns:

=ARRAYFORMULA(XLOOKUP(F3 & "|" & G3, B3:B10 & "|" & C3:C10, D3:D10))

ARRAYFORMULA is needed here too; without it the formula returned #N/A in our test. The fourth argument of XLOOKUP sets what to show when nothing is found: add , "not found" after the result range. See XLOOKUP and VLOOKUP compared.

5. INDEX and MATCH

5. INDEX and MATCH

=INDEX(D3:D10, MATCH(1, (B3:B10 = F3) * (C3:C10 = G3), 0))

Each comparison returns TRUE or FALSE for every row. Multiplied, they give 1 only in the rows where both are true, and MATCH finds the position of the first 1. INDEX returns the salary from that position. More conditions are more brackets multiplied together.

With one criterion, the same pair is the classic alternative to VLOOKUP:

=INDEX(D3:D10, MATCH(F3, B3:B10, 0))

Google Sheets with the formula =INDEX(D3:D10, MATCH(F3, B3:B10, 0)) returning the salary 567 for Mike Johnson

See the guide to MATCH.

When the result is a number: SUMIFS

When the result is a number: SUMIFS

If the value to return is a number and each combination of criteria occurs once, SUMIFS is the simplest lookup of all:

=SUMIFS(D3:D10, B3:B10, F3, C3:C10, G3)

It returns 0 when nothing matches and the sum when several rows match, so use it only where duplicates are impossible or a total is what you want.

Criteria from dropdowns and partial keys

Criteria from dropdowns and partial keys

A lookup is easier to use when the criteria cells are dropdowns: the reader picks a value that exists, and typos cannot break the match. Select the cell, click Data > Data validation and add a dropdown from the range that holds the keys.

The Data validation rules panel in Google Sheets with a dropdown built from the range of laptop models

=VLOOKUP(F3, C3:D10, 2, FALSE)

Google Sheets with a dropdown in F3 set to Acer Swift 3 and a VLOOKUP formula returning its price, 900

See data validation.

A key that is only the beginning of the value

With an exact match, VLOOKUP accepts wildcards in the search key. An asterisk after the key finds the first value that starts with it:

=VLOOKUP(F3 & "*", $B$3:$D$10, 3, FALSE)

Google Sheets with employee IDs such as 103-EF in column B and a VLOOKUP formula with the key 103 followed by an asterisk returning the department Information Technology

Errors and wrong results

Errors and wrong results

⚠️ Error: #N/A

✅ Solution: No row has this combination. Check the separator (the key and the helper column must use the same one), spaces at the ends of the values, and numbers stored as text on one side. Dates join as serial numbers, which is fine as long as both sides are real dates.

⚠️ Error: #REF! in the array version.

✅ Solution: ARRAYFORMULA is missing around a formula that joins two ranges inside curly braces.

⚠️ Error: #REF! although ARRAYFORMULA is in place.

✅ Solution: The index is larger than the number of columns in the range. With a two-column array, the index is 2. An index of 0 returns #VALUE!.

⚠️ Error: The formula returns a value, but from the wrong row.

✅ Solution: Two causes. The last argument is TRUE or missing, which makes VLOOKUP return an approximate match: set it to FALSE. Or the combination occurs more than once and the first match is returned: use FILTER to see all of them.

⚠️ Error: The lookup worked for the first row and fails for the others.

✅ Solution: The ranges are not locked. Add dollar signs, $B$3:$D$10, before copying the formula down.

Related guides

A lookup by two keys is a join done by hand

A lookup by two keys is a join done by hand

Matching a salary to a name and a department, or a cost to a campaign and a date, is a join between two tables. In a sheet it is rebuilt with every export: paste both tables, rebuild the keys, fix the rows that do not match because of a space. In a data warehouse the same join is one line of SQL that runs the same way every time.

The OWOX Data Marts extension for Google Sheets covers that half. A data analyst publishes a data mart (a table or an SQL query in your data warehouse) and makes it available for reports. In Sheets you open the extension, pick the data mart, tick the columns you want and run it. The rows land in a tab, ready for your formulas.

Google Sheets with the OWOX Data Marts extension open beside an ad spend table: the Unified Ad Spend data mart, nine of fourteen columns ticked and a Save & Run button – the rows in the sheet come from a governed data mart, not a pasted export

What changes for the person who maintains the sheet:

  • Refresh replaces re-export. Refresh current report in the extension menu re-runs the same pull, and a scheduled refresh keeps the tab current without anyone touching it.
  • The source is written on the sheet. The header cell of an imported tab carries a note with the data mart it came from, the time of the import and a link to the report.
  • No SQL and no warehouse access needed. The analyst decides which data marts and columns are available. You choose from that list.

The extension does not write or change the analyst’s SQL. With the join written once in that SQL, the sheet receives one table that already has both sets of columns, and the two-key lookup is no longer needed. The extension comes with the OWOX Cloud plans of OWOX Data Marts; spreadsheet reporting describes both ways data reaches a sheet.

Your New Normal

Turn your data into decisions.

Governed data marts give you the clean foundation ML needs to actually work.

  • No AI hallucinations
  • Analyst-governed definitions
  • Every number traces to SQL
Get started free

FAQ

Frequently Asked Questions

What tips can improve performance when using VLOOKUP for multiple criteria?

To improve VLOOKUP performance for multiple criteria, limit the lookup range instead of referencing entire columns, sort data if using approximate matches, and use absolute references to prevent errors when copying formulas. These practices enhance efficiency and accuracy.

How can I use VLOOKUP for multiple criteria without a helper column?

Build the joined column inside the formula with curly braces: ARRAYFORMULA(VLOOKUP(F3 & "|" & G3, {B3:B10 & "|" & C3:C10, D3:D10}, 2, FALSE)). The first column of the array is the joined key and the second the values to return; ARRAYFORMULA is required. FILTER is shorter and needs no joining: FILTER(D3:D10, B3:B10 = F3, C3:C10 = G3).

What are common errors when using VLOOKUP with multiple criteria?

Common errors when using VLOOKUP with multiple criteria include #N/A for unmatched values, #REF! for invalid ranges, and #VALUE! for incorrect column references. Understanding these errors helps troubleshoot and improve the accuracy of data retrieval.

What advanced techniques can I use with VLOOKUP and multiple criteria?

Beyond a helper column, use FILTER with one condition per criterion, XLOOKUP on joined ranges inside ARRAYFORMULA, or INDEX with MATCH(1, (range1 = value1) * (range2 = value2), 0). FILTER is the only one that returns every matching row. Avoid the CHOOSE({1, 2}, ...) form copied from Excel: in Google Sheets it returned only the first row of the ranges in our test.

Why do we need to use VLOOKUP with multiple criteria?

Using VLOOKUP with multiple criteria enables users to perform more complex lookups based on several conditions, improving data retrieval accuracy. This approach is essential when information is structured in a way that requires consideration of more than one attribute for effective searches.

What is the VLOOKUP function in Google Sheets?

The VLOOKUP function in Google Sheets searches for a value in the first column of a specified range and returns a value in the same row from a specified column. It's commonly used for data retrieval, making it essential for managing structured datasets.

Who wrote this

Vadym Kramarenko

Vadym Kramarenko · Growth Marketing Manager

Vadym Kramarenko is a Growth Marketing Manager at OWOX, where he drives user acquisition and product-led growth strategies. He hosts the OWOX podcast, interviewing analytics professionals about data-driven marketing, attribution, and reporting best practices. Vadym specializes in turning complex analytics concepts into practical, actionable marketing frameworks.