# How to Do VLOOKUP in Excel with Two Spreadsheets

If your lookup value and lookup range are stored in different Excel workbooks (spreadsheets), VLOOKUP will do the job easily. However, if you need to vlookup another Excel Online file, this will create some difficulties. Read on to learn more.

## How to vlookup another workbook in Excel

We imported a dataset from Google Sheets to Excel using Coupler.io, a solution for automatic data exports from multiple apps and sources.

Read more about Microsoft Excel integrations for data export on a schedule.

The data was imported to the workbook titled “*dataset*” – this is our lookup range. The lookup values are stored in another spreadsheet, titled “*users*“.

Let’s vlookup these two spreadsheets. Complete the following steps:

- Type
`=vlookup(`

in the B2 cell of the*users*workbook.

- Specify the lookup value. You can enter a string wrapped in quotes or reference a cell just like we did:

- Enter a comma/semicolon (depending on the list separator defined under your regional settings), click on the spreadsheet with the range you want to look up and select the desired range. In our case, the unfinished formula looks like this:

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

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

[dataset.xlsx]dataset!$A$2:$F$101

`[dataset.xlsx]`

– name of the spreadsheet`dataset!`

– name of the worksheet`$A$2:$F$101`

– locked range to lookup

- In the formula bar, add a comma/semicolon and enter the column number, which contains the matching value to return. In our case, the number is 4 (column D).

=vlookup(A2,[dataset.xlsx]dataset!$A$2:$F$101,4

- Add a comma/semicolon and enter FALSE to return the exact match. Close the bracket and hit enter

=vlookup(A2,[dataset.xlsx]dataset!$A$2:$F$101,4,FALSE)

To return the matching values for other users, we can drag the formula down:

Or use an array formula:

- You need to specify an array as a lookup value

=VLOOKUP(A2:A66,[dataset.xlsx]dataset!$A$2:$F$101,4,FALSE)

- Then select an array where to return the matching values, insert the VLOOKUP formula into the formula bar and press
*Ctrl+Shift+Enter*for Windows (*Command+Return*for Mac)

## How to vlookup another Excel Online file

Unfortunately, the flow described above for VLOOKUP does not work with Excel Online workbooks. You can’t select the range to look up from another spreadsheet. The simplest way to solve this is to import the required data from another workbook using Coupler.io and perform the vlookup as above.

Or you can look up from another spreadsheet using this syntax:

`=VLOOKUP("lookup_value",'https://d.docs.live.net/spreadsheet-id/Docs/[spreadsheet-name.xlsx]sheet-name'!locked-lookup-range,column_number,match)`

Let’s see how it works in the example. We’ll use the same workbooks from above – *dataset* and *users* – but edited in Excel Online.

The parameters we need for our VLOOKUP formula are:

`"lookup_value"`

– A2

- You can find the spreadsheet-id of your Excel Online workbook in the URL bar.

- The spreadsheet name and the range should not cause any trouble. But do not forget to lock the lookup_range using $ symbols. Now the VLOOKUP formula looks like this:

=vlookup(A2,'https://d.docs.live.net/ec25d9990d879c55/Docs/[dataset.xlsx]dataset'!$A$2:$F$50,column_number,match)

- As the last step, specify the column number and the match parameters. Now we can run our VLOOKUP formula:

=vlookup(A2,'https://d.docs.live.net/ec25d9990d879c55/Docs/[dataset.xlsx]dataset'!$A$2:$F$50,4,false)

With this syntax, you can either drag your VLOOKUP formula or apply an array formula as we described above.

Back to Blog