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

Data Analysis

  • How to sum a total in multiple Excel tables
  • Calculate Conditional Percentile ‘IF’ in table in Excel
  • Subtotal function in Excel
  • How to Create Thermometer Chart in Excel
  • How to Sort by Color in Excel

References

  • How to use Excel FORMULATEXT function
  • Vlookup Examples in Excel
  • How to get first column number in range in Excel
  • How to get first row number in range in Excel
  • Extract all partial matches in Excel

Data Validations

  • Excel Data validation must begin with
  • Excel Data validation allow uppercase only
  • How To Create Drop-down List in Excel
  • Excel Data validation only dates between
  • Excel Data validation must not contain

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:   Example of COUNTIFS with variable table column 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:   How to convert text string to array in Excel

The trick is the INDIRECT function to evaluate the reference.

Worked Example:   Excel Data validation specific characters only

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:

How to generate random date between two dates in Excel

Next Post:

Popularly Used Excel Functions and their examples

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

  • NOT function: Description, Usage, Syntax, Examples and Explanation
  • TRUE function: Description, Usage, Syntax, Examples and Explanation
  • IF with boolean logic in Excel
  • How to use Excel FALSE Function
  • FALSE function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Count times in a specific range in Excel
  • Generate series of dates by weekends in Excel
  • MONTH function: Description, Usage, Syntax, Examples and Explanation
  • How to enter Today’s Date or Static Date and Time in Excel
  • Get week number from date in Excel

Grouping

  • Map inputs to arbitrary values in Excel
  • Group times into 3 hour buckets in Excel
  • Group numbers at uneven intervals in Excel
  • Group numbers with VLOOKUP in Excel
  • Running count group by n size in Excel

General

  • Excel Operators
  • Check if multiple cells have same value with case sensitive in Excel
  • How to calculate percent sold in Excel
  • How to get original price from percentage discount in Excel
  • Convert column letter to number in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning