Excel formula get data from another workbook

This tutorial will demonstrate how to reference a cell in another sheet in Excel and Google Sheets

Excel formula get data from another workbook

Reference to another Sheet – Create a Formula

In a workbook with multiple worksheets, we can create a formula that will reference a cell in a different worksheet from the one you are working in.

Select the cell where the formula should go ex: C7

Press the equal sign, and then click on the sheet you wish to reference.

Excel formula get data from another workbook

Click on the cell that holds the value you require.

Excel formula get data from another workbook

Press Enter or click on the tick in the formula bar.

Excel formula get data from another workbook

Your formula will now appear with the correct amount in cell C7.

The sheet name will always have an exclamation mark at the end.  This is followed by the cell address.

Sheet_name!Cell_address

For example:

=Northern!C10

If your sheet name contains any spaces, then the reference to the sheet will appear in single quotes.

For example:

='Northern Office'!C10

Should the value change in the source sheet, then the value of this cell will also change.

You can now drag that formula across to cells D7 and E7 to reference the values in the corresponding cells in the source worksheet.

Excel formula get data from another workbook

Reference to Another Sheet – the INDIRECT Function

Instead of typing in the name of the sheet, you can use the INDIRECT Function to get the name of the sheet from a cell that contains the sheets name.

Excel formula get data from another workbook

When you reference another sheet in Excel, you usually type the sheet’s name, and then an exclamation mark followed by the cell reference.  Since sheet names often contain spaces, we often enclose the name of the sheet in single quotes.

In the formula above therefore, we have used the INDIRECT Function to refer to the name of the sheet in cell B7 ex: “Northern”.

The entire formula above would therefore be

=INDIRECT("'" & Northern & "!C10")

where we have replaced the sheet name “Northern” with cell B7.

We can then copy that formula down to C8 and C9 – and the sheet name “Northern” will be replaced with “Southern” and “Western” as the formula is copied down.

Reference to another Sheet – an Array Formula

To reference to another sheet using an Array formula, select the cells in the Target worksheet first.

For example:

Select C8:E8

Excel formula get data from another workbook

Press the equal sign, and then click on the worksheet that contains the Source data.

Excel formula get data from another workbook

Highlight the relevant source data cells.

Excel formula get data from another workbook

Press Enter to enter the formula into the Target worksheet.

Excel formula get data from another workbook

You will notice that the cells contain a range (C10:E10) but that each relevant column will only show the value from the corresponding column in the source workbook.

Reference to a Range Name

The array formula is useful when you are referencing to a range name that contains a range of cells and not just a single cell.

Excel formula get data from another workbook

In the above example, the total values of the Western office in row 10 is called Western.

Click in the Head Office sheet, highlight the cells required and press the equal sign on the keyboard.

Excel formula get data from another workbook

Type the range name that you have created ex: Western.

Excel formula get data from another workbook

Press Enter.

Excel formula get data from another workbook

An array formula will be created.

Reference to another Workbook

You can also link workbooks together by means of referencing to a cell in another workbook.

Excel formula get data from another workbook

Have both workbooks open in Excel.  You can use the view menu to see them both on the screen if you wish.

Click in the cell you wish to put the source data in ex: C12

Press the equal key on the keyboard and click on the Source cell in the different Workbook.

Excel formula get data from another workbook

Press Enter.

The formula that is entered into the original sheet will have a reference to the external file, as well as a reference to the sheet name in the external file.

The name of the workbook will be put into square brackets, while the sheet name will always have an exclamation mark at the end.  This is followed by the cell address.

[Workbook_name]Sheet_name!Cell_address

For example:

=[SalesFigures.xlsx]Northern!$C$10

You will notice that the cell reference has been made an absolute.  This means that you CANNOT drag it across to columns D and E unless you remove the absolute.

Click in the cell, and then click in the formula bar and click on the cell address of the formula bar.

Press F4 until the absolute is removed.

Excel formula get data from another workbook

Alternatively, you can delete the $ signs from around the absolute.

Drag the formula across to columns D and E.

Excel formula get data from another workbook

Reference to another Sheet in Google Docs

Linking worksheets with formulas works the same way in Google Docs as it does in Excel.

Click in the cell you wish to put the formula into, and then click on the Source cell where your value is stored.

Excel formula get data from another workbook

Press Enter.

Your formula will now appear with the correct amount in cell C7.

The sheet name will always have an exclamation mark at the end.  This is followed by the cell address.

Sheet_name!Cell_address

For example:

=Northern!C10

Excel formula get data from another workbook

Drag the formula across to populate columns D and E, and then repeat the process for all the sheets.

Excel formula get data from another workbook

Reference to another Sheet using an Array Formula in Excel

The array formula will also work in the same way.

Highlight the range you wish to put the target information in and press the equal sign on the keyboard.

Excel formula get data from another workbook

Click on the Source sheet and highlight the cells you require.

Excel formula get data from another workbook

Press Shift+Enter.

Excel formula get data from another workbook

The formula will appear as a range but that each relevant column will only show the value from the corresponding column in the source workbook.

Excel formula get data from another workbook

Reference to another Workbook in Google Docs

If you want to link Google Sheets files together, you need to use a function called IMPORTRANGE

Excel formula get data from another workbook

Open the Source Google sheet file in order to copy the URL address of the file.

For example

Excel formula get data from another workbook

Return to the sheet where you wish to input the formula and click in the relevant cell.

Press the equal sign on the keyboard and type in the function name ex: IMPORTRANGE, followed by a bracket and inverted commas.

Excel formula get data from another workbook

Paste the URL copied from the source Google sheet into the formula.

Close the inverted commas

For example:

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1kJ9ECcuwO65ayFXCobxuUSwx9MnPSDXypiyPWoHc59E/edit#gid=1711678147"

Add another comma and then also in inverted commas, type in the cell reference required

For example

“Northern!C10”

Your complete formula will look like the example below

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1kJ9ECcuwO65ayFXCobxuUSwx9MnPSDXypiyPWoHc59E/edit#gid=1711678147", "Northern!C10")

When you link Google sheets for the first time, this message could appear.

Excel formula get data from another workbook

Click Allow access.

Repeat the process for any other cells that need to be linked eg D10 and E10.

TIP: Drag the formula across to the required cells and change the cells address in the formula bar!

Excel formula get data from another workbook

Can an Excel formula reference another workbook?

Of course, you can. You just need to create a link between the worksheets (within the same workbook or in different workbooks) by using what is called an external cell reference or a link.

What is the Excel formula to pull data from another sheet?

To pull values from another worksheet, we need to follow these steps:.
Select cell C3 and click on it..
Insert the formula: =VLOOKUP(B3,'Sheet 2'!$ B$3:$C$7,2,0).
Press enter..
Drag the formula down to the other cells in the column by clicking and dragging the little “+” icon at the bottom-right of the cell..