Multiple VLOOKUP Matches is a one-step tool that finds those records in your Google Sheets that correspond to the required conditions. When the standard Google Sheets VLOOKUP function and INDEX+MATCH are not enough, use this add-on to quickly set up more than one criteria, vlookup to the left as well, and return multiple matches from multiple columns. It's also up to you to decide if you need the result as a formula or as values.
Video: Vlookup multiple values in Google Sheets
Before you start
Date and time formats
To match or lookup dates and time, make sure that the same number format is applied to the entire column with those records (Format > Number in the Google Sheets menu).
If the column contains records formatted differently, for instance, pure dates (9/27/2019) and date and time (9/27/2019 9:00 AM), the add-on won't be able to return the correct results.
Multiple VLOOKUP Matches is case-insensitive, like the standard Google Sheets VLOOKUP. In other words, it doesn't distinguish values written in different cases. Thus, records like Blackberry and blackberry in your matching conditions will be treated as the same.
If you'd rather consider the text case, the workaround with INDEX+MATCH from this blog post should help you.
How to use Multiple VLOOKUP Matches
Start the add-on
To run the tool, go to Extensions > Multiple VLOOKUP Matches > Start in the Google Sheets menu:
You will see the add-on window with the settings at your service.
Tip. Power Tools
also has Multiple VLOOKUP Matches in its pocket. Look for the add-on icon in the Process
Specify matching conditions
For Multiple VLOOKUP Matches to work, you should specify your source data table, set up your lookup criteria, and decide upon the number of matches to pull:
- Select the range with your source data.
Tip. Pick just one cell within your table and click Auto select. The add-on will instantly highlight all cells with data (till the first blank row & column).
Tip. Click on the Select range icon within the Source range field to specify the data you want to process.
- If your table columns have titles, tick off the option My table has a header. In this case, the first row will not be matched with your criteria.
- Choose how many rows you'd like to retrieve:
- Pick All to find and pull all matching rows.
- For the tool to look up only a few of the foremost records, click First and enter the number of rows you'd like to see.
- Here you are to decide whether to return matching values from all or only some columns of the range. Check as many individual columns as you need or keep Select all ticked off to get them all.
- And here goes the first condition itself: it starts with If. Its first dropdown lists all search columns of your table. Choose the one that should meet some criterion, e.g. dates that should belong to some period of time or car labels if you need the info on a specific model.
- The second dropdown contains operators that are used in formulas. They signal about different calculation types:
- This button lets you choose between AND or OR logic for your criteria:
- By default, all additional criteria start with and. This means that all created conditions should be met to get a match.
- If you're okay with either of the criteria to be true for a match, pick the or option from the dropdown instead.
Note. Whatever logic you select, it will be applied to all built conditions.
- If you change your mind about any сriterion, you can delete it by clicking the Close icon at the end of the criterion line.
- Click on the plus icon to set up more conditions.
Preview and paste the result
Once your requirements are set, you can get the result in a few different ways:
- By clicking on three dots and pulling the border up or down, you can expand or shorten the preview area.
- Decide where to place the result: click on the Select range icon and pick the upper leftmost cell for the returned matches.
- Based on your conditions, the add-on builds a QUERY formula and shows it to you in this formula field. It updates itself dynamically once anything changes in your criteria.
- To take a quick glance at the result before pasting it to your spreadsheet, hit Preview result.
- For the preview, all found matches from the necessary columns will be grouped at the bottom of the Multiple VLOOKUP Matches window.
Tip. You can tweak your criteria and click Preview result again to get other values.
- Both these buttons insert the result to your spreadsheet but in slightly different ways:
- Click Insert formula to paste everything as the QUERY formula.
- Or have only values returned by choosing Paste result.