Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • Create hyperlink with VLOOKUP in Excel
  • How to get address of last cell in range in Excel
  • Left Lookup in Excel
  • How to create dynamic named range with OFFSET in Excel
  • How to use Excel FORMULATEXT function

Data Analysis Examples

  • How to add Trendline to a chart in Excel
  • Error Bars in Excel
  • Filter Data Based on Date in Excel
  • How to calculate correlation coefficient Correlation in Excel
  • Conditional Formatting Rules in Excel

Data Validation Examples

  • Excel Data validation date in next 30 days
  • Excel Data validation exists in list
  • Excel Data validation number multiple 100
  • Excel Data validation don’t exceed total
  • Excel Data validation date in specific year

How to create dynamic reference table name in Excel

by

To build a formula with a dynamic reference to an Excel Table name, you can use the INDIRECT function with concatenation as needed.

Formula

=SUM(INDIRECT(table&"[column]"))

Note: INDIRECT is a volatile function and can cause performance issues in larger, more complex workbooks.

Explanation

In the example shown, the formula in L5 is:

=SUM(INDIRECT(K5&"[Amount]"))

Which returns the SUM of Amounts for three tables named “West”, “Central”, and “East”.

Worked Example:   COUNTIF with non-contiguous range in Excel

How this formula works

This formula behaves like these simpler formulas:

=SUM(West[Amount])
=SUM(Central[Amount])
=SUM(East[Amount])

However, instead of hardcoding the table into each SUM formula, the table names are listed in column K, and the formulas in column L use concatenation to assemble a reference to each table. This allows the same formula to be used in L5:L7.

Worked Example:   Lookup entire column in Excel

The trick is the INDIRECT function to evaluate the reference.

Worked Example:   How to convert text string to array in Excel

We start with:

=SUM(INDIRECT(K5&"[Amount]"))

which becomes:

=SUM(INDIRECT("West"&"[Amount]"))

and then:

=SUM(INDIRECT("West[Amount]"))

The INDIRECT function then resolves the text string into a proper structured reference:

=SUM(West[Amount])

And the SUM function returns the final result, 27,500 for the West region.

Post navigation

Previous Post:

Calculate Conditional Percentile ‘IF’ in table in Excel

Next Post:

How to count table rows in Excel

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
  • Normalize text by removing punctuations, extra spaces and more in Excel
  • TEXTJOIN function: Description, Usage, Syntax, Examples and Explanation
  • How to count total characters in a range in Excel
  • How to add a line break with a formula while joining text strings in Excel
  • Split text and numbers in Excel
  • NETWORKDAYS function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate Day of the Year in Excel
  • EOMONTH function: Description, Usage, Syntax, Examples and Explanation
  • TIMEVALUE function: Description, Usage, Syntax, Examples and Explanation
  • Display Date is same month in Excel
  • DOLLARFR function: Description, Usage, Syntax, Examples and Explanation
  • Compound Annual Growth Rate CAGR formula examples in Excel
  • Calculate payment for a loan in Excel
  • MDURATION function: Description, Usage, Syntax, Examples and Explanation
  • COUPDAYBS function: Description, Usage, Syntax, Examples and Explanation
© 2022 xlsoffice . All Right Reserved. | Teal Smiles