Coupler.io Blog

Excel VLOOKUP Multiple Columns: Explanation + Examples

The Excel VLOOKUP function allows you to look up on one column at a time. And what if you need to return the matching values from two or more columns? This can be done quite easily. 

Excel VLOOKUP on multiple columns – the logic of the lookup

I have a dataset imported from BigQuery to Excel with Coupler.io. It’s a data integration platform and AI analytics solution that allows you to connect almost any data source to Excel and automate data refresh. In addition, you get a package with predesigned dashboard templates, data set transformations, AI agent + integrations, and more.

Automate data export to Excel with Coupler.io

Get started for free

My goal is to learn the car, color, and country for a specific user name. For this, we need to look up these three columns.

The basic format of the VLOOKUP only returns a single value. But a small tweak will do the job for us.

Excel VLOOKUP multiple columns syntax

=VLOOKUP("lookup_value",lookup_range, {col1,col2,col3…},[match])

How to VLOOKUP multiple columns in Excel – example

Here is the VLOOKUP formula we have:

=VLOOKUP(I2,A:F,{4,5,3},FALSE)

But you can’t just insert this formula into J2 cell and hit enter. This would only return one value. What you need to do is select a vertical array that corresponds to the number of columns in your VLOOKUP formula. In our case, we need to select three cells. After that, you can insert the formula to the formula bar and press Ctrl+Shift+Enter for Windows (Command+Return for Mac) – this will apply an array formula in Excel.

Excel Online VLOOKUP to return multiple columns 

In Excel Online, VLOOKUP works almost the same way, but you don’t have to select an array and press a button combination to implement it.

You can just insert the formula in one cell and press Enter => the matching values for the columns specified in the formula will be populated automatically.

How to automate data import to Excel

Now you know how to use VLOOKUP across several columns. The data behind it still has to get into Excel. Copying it by hand for about 10 minutes a day adds up to roughly 3 hours a month. Coupler.io loads the data automatically and removes copy-paste errors.

Here’s how it works:

If the lookup table comes from another app, a join in Coupler.io returns the matching columns in the same row, so you need no array formula.

To see for yourself, use the form below. Choose from 400+ different data sources, then follow instructions to connect your data to Excel without coding.

Excel VLOOKUP array on multiple columns in different workbooks

If your lookup values and lookup range are stored in different workbooks, the VLOOKUP function works the same way. The only difference is that you need to select the lookup range in the other spreadsheet.

For example, we have two workbooks

To vlookup the range in a separate workbook, complete the following steps:

=VLOOKUP(A2
=vlookup(A2,[dataset.xlsx]dataset!$A:$F

So, basically, you can manually type the range to lookup using the following sample:

[dataset.xlsx]dataset!$A:$F
=vlookup(A2,[dataset.xlsx]dataset!$A:$F,{4,5,3},FALSE)

Now you can drag the formula down to return matching values for all the users.

Excel VLOOKUP: Compare multiple columns

We already blogged about how to compare two columns in Excel using VLOOKUP. Let’s see how we can make a comparison of three columns. 

In the dataset, we have three columns: Old users, New users, and Expected users. VLOOKUP will help us compare the values from these columns to identify the values that are present in all of the columns.

The logic of the formula is the following:

The same logic will apply for bigger numbers of columns to compare – you need to narrow down the comparison to two columns. In our case, the VLOOKUP formula will look as follows

=IFERROR(VLOOKUP(IFERROR(VLOOKUP(A:A,C:C,1,FALSE),""),E:E,1,FALSE),"")

To implement the formula, select an array, which will be not less than the arrays in your VLOOKUP formula, insert the following formula to the formula bar and press Ctrl+Shift+Enter for Windows (Command+Return for Mac):

It would also be great to exclude empty cells in the array. You can do this using the UNIQUE function, which is available in Excel 365 or Excel Online. The other way is to apply this advanced array formula:

=IF(ISERROR(SMALL(IF(H2:H66<>"",ROW(H2:H66)-1),ROW(H2:H66)-1)),"",
INDEX(H2:H66,MATCH(SMALL(IF(H2:H66<>"",ROW(H2:H66)-1),ROW(H2:H66)-1),
IF(H2:H66<>"",ROW(H2:H66)-1),0)))

You can use this array formula for your cases by replacing H2:H66 with your range.

Remember you can always load your marketing, sales, or financial data to Excel automatically with the Coupler.io data integration platform and AI analytics solution.

Automate reporting in Excel with Coupler.io

Get started for free
Exit mobile version