Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to Create One and Two Variable Data Tables in Excel
  • Subtotal function in Excel
  • Conditional Formatting Data bars Examples in Excel
  • Error Bars in Excel
  • Everything about Charts in Excel

References

  • How to calculate two-way lookup VLOOKUP in Excel Table
  • Find closest match in Excel
  • Count unique text values with criteria
  • How to use Excel ROWS Function
  • How to get last row in mixed data with blanks in Excel

Data Validations

  • Excel Data validation whole percentage only
  • Excel Data validation allow uppercase only
  • Excel Data validation must not contain
  • Excel Data validation specific characters only
  • Excel Data validation exists in list

Create dynamic workbook reference to another workbook in Excel

by

To build a dynamic worksheet reference – a reference to another workbook that is created with a formula based on variables that may change – you can use a formula based on the INDIRECT function. See example below:

Formula

=INDIRECT("'["&workbook&"]"&sheet&"'!"&ref)

Explanation

In the example shown, the formula in E6 is:

=INDIRECT("'["&B6&"]"&C6&"'!"&D6)

How this formula works

The gist of this formula is to build up a complete reference to a range in another workbook as text, then use the INDIRECT function to convert the text to an actual reference.

A reference to an external worksheet looks like this:

‘[sample data.xlsx]Sheet1’!A1

Note the square brackets ([ ]) around workbook name, single quotes (‘ ‘) around the worksheet + sheet, and the exclamation mark (!) that follows.

To create a reference like this using text, we use concatenation to join values from columns B, C, and D with the required brackets, quotes, and exclamation mark:

=INDIRECT("'["&B6&"]"&C6&"'!"&D6)

The result is fed into INDIRECT as the ref_text:

=INDIRECT("'[sample data.xlsx]Sheet1'!A1")

The INDIRECT function then evaluates the text and converts it to a reference. Excel follows the reference and returns the value at the given reference.

Note: if the reference is invalid, or if the workbook referenced is not open, INDIRECT will throw a #REF error. You can catch this error with the IFERROR function and display a custom result if you like.

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • Complete List of Excel Logical Functions, References and Examples
  • TRUE function: Description, Usage, Syntax, Examples and Explanation
  • NOT function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel NOT Function

Date Time

  • Get fiscal year from date in Excel
  • Two ways to sum time over 30 minutes in Excel
  • Display Date is workday in Excel
  • Convert Excel time to decimal hours in Excel
  • Add months to date in Excel

Grouping

  • Map inputs to arbitrary values in Excel
  • Group arbitrary text values in Excel
  • How to randomly assign data to groups in Excel
  • Group numbers with VLOOKUP in Excel
  • Group times into unequal buckets in Excel

General

  • How to generate random times at specific intervals in Excel
  • How to make excel worksheets print on one page?
  • How to calculate profit margin percentage in Excel
  • Check if range contains a value not in another range in Excel
  • Automatically fill series of cells in Excel using AutoFill
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning