Go Back

How to Build a Dynamic Workbook Reference in Excel

We can build a dynamic workbook reference by using the INDIRECT FUNCTION. This will enable us to easily work on different workbooks, allowing us to switch between them frequently to check and retrieve values from several worksheets.

Figure 1: Created Dynamic Workbook Reference

General Formula

=INDIRECT ("'["&workbook name&"]"&sheet name&"'!"&reference cell)

Formula

=INDIRECT("'["&A2&"]"&B2&"'!"&C2)

Setting up the Data

  • We will have two workbooks. The first is the reference workbook where we intend to create the dynamic reference in

Figure 2: Reference workbook

  • We will name the second workbook as SAVINGS
  • We will input the values into Cell A1 to Cell A4 as shown in figure 3

Figure 3: Data contained in the second workbook titled SAVINGS

You will notice in figure 2 that the WORKBOOK has .xlsx attached to the name of the second workbook. Always add .xlsx to the name to ensure that it is a valid reference. Also, you will notice that Sheet1 in figure 3 has no space. That is why we mustn’t leave a space when inserting the data in the reference workbook in figure 2.

Creating the Dynamic Workbook Reference

  • We will click on Cell D4 of the reference workbook and insert the formula below

=INDIRECT("'["&A4&"]"&B4&"'!"&C4)

Figure 4: Creating the Dynamic Workbook Reference

  • We will press the enter key

Figure 5: Creating the Dynamic Workbook Reference

  • We will use the drop-down feature to get the reference values for the other cells

Figure 6: Created Dynamic Workbook Reference

Explanation

=INDIRECT ("'["&workbook name&"]"&sheet name&"'!"&reference cell)

In this formula, we want to use the INDIRECT function to create a complete reference to a specified range in the second workbook. The INDIRECT function converts text to an actual reference and returns the value in the specified cells and worksheets.

A reference to the second worksheet will look like this:

'[SAVINGS.xlsx]Sheet1'!A4

Note

The workbook (SAVINGS workbook) that we intend to reference must be open, else, INDIRECT will display a #REF error.

Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

I need to make a dynamic sheet reference for all cells in a formula
Solved by E. U. in 24 mins
I have cells that reference other cells in the same workbook, but from different sheets. I am trying to copy sheets from one workbook to another workbook with the same named sheets. I want the reference cells to reference from the new workbook not the original workbook.
Solved by O. W. in 25 mins
formula won't reference closed workbook only works with workbook open
Solved by F. F. in 18 mins

Leave a Comment

avatar