Formualizer Docs

INDIRECT

Converts text into a reference and returns the referenced value or range.

INDIRECT lets formulas build references dynamically from strings such as "A1" or "Sheet2!B3:C5".

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=INDIRECT(ref_text, [a1])

Arguments

ArgumentTypeRequiredDefault
ref_texttextRequired—
a1logical or numberOptionaltrue

Return type

Can return a reference when evaluated in a reference context.

Remarks

  • a1_style defaults to TRUE (A1 style parsing).
  • The function is volatile because target references can change without direct dependency links.

Differences from Excel

R1C1 cell and range references selected with a1_style=FALSE return #N/IMPL! in Formualizer.

Error cases

  • Invalid or unresolved references return #REF!.

Examples

Resolve an A1-style address provided as text.

Formula =INDIRECT("A1")

Input cells
A
199

Expected result 99

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Resolve an absolute A1-style reference and explicitly select A1 notation.

Formula =INDIRECT("$B$2",TRUE)

Input cells
B
242

Expected result 42

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Resolve the reference to an empty cell.

Formula =INDIRECT("B1")

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A string that cannot be resolved to a reference returns an error.

Formula =INDIRECT("not a reference")

Expected result #REF!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Resolve a range and aggregate it

Formula =SUM(INDIRECT("A1:A3"))

Input cells
A
15
27
39

Expected result 21

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What happens if a1_style is FALSE?

R1C1 cell and range references are unsupported. Defined names and table references can still resolve with either flag.

How are bad reference strings reported?

If the text cannot be parsed or resolved to a valid reference, INDIRECT returns #REF!.

Implementation

Engine source

On this page