We’re improving Formula Genius. We’re redesigning the app and fixing issues along the way. Sorry for any disruption, and thank you for your patience.
Excel advanced

Excel INDIRECT Function: Dynamic Cell References

INDIRECT converts text strings into cell references. Use it to dynamically reference sheets, create flexible formulas, and build cascading dropdowns.

Formula Genius can generate a draft from a plain-English prompt. Supported formulas can be checked with sample cases; review the coverage on the result.

The formula

Prompt

"Sum values from a sheet whose name is in cell A1"

Excel
=SUM(INDIRECT("'"&A1&"'!B2:B100"))

INDIRECT builds a sheet reference from the text in A1. If A1 contains "January", this becomes =SUM('January'!B2:B100). Change A1 to "February" and it automatically references the February sheet.

Step-by-step breakdown

  1. A1 contains the sheet name as text (e.g., "January")
  2. "'"&A1&"'!B2:B100" builds the string: 'January'!B2:B100
  3. INDIRECT converts this text string into a real cell reference
  4. SUM then totals the referenced range
  5. Single quotes around the sheet name handle spaces in sheet names

Edge cases & warnings

  • INDIRECT is volatile — recalculates every time, can slow workbooks
  • Returns #REF! if the referenced sheet or range doesn't exist
  • Cannot be used across workbooks (external references don't work)
  • Google Sheets INDIRECT works the same way

Examples

Prompt

"A1 = "Q1 Sales""

Excel
SUM('Q1 Sales'!B2:B100)
Prompt

"A1 = "Budget""

Excel
SUM('Budget'!B2:B100)

Frequently asked questions

Why is INDIRECT considered bad practice?

INDIRECT is volatile (recalculates constantly), breaks when you rename sheets, and is hard to audit. Use direct references or structured Tables when possible. Use INDIRECT only when you truly need dynamic sheet references.

Can I use INDIRECT with named ranges?

Yes. =INDIRECT(A1) where A1 contains a named range name (like "SalesData") will reference that named range.

Can't find what you need?

Describe a formula in plain English. Formula Genius drafts and explains it, and can check supported formulas on sample cases.