Skip to content

INDIRECT

Turns text such as "B4" or "C2:C9" into a working reference. It is volatile and hard to audit, so use it sparingly.

Syntax

=INDIRECT(, )

Lookup and reference

Every version of Excel, including Microsoft 365, Excel 2024, 2021, 2019, 2016 and earlier, Excel for the web and the mobile apps.

Try it

Edit the formula in D5 or change the inputs. The sheet recalculates as you type.

D5
A
B
C
D
1
Region
Revenue
Cell to read
2
North
48,200
B4
3
South
31,750
4
East
42,900
Value
5
West
37,400
42,900
6
7
8

D5 =INDIRECT(D2) returns 42,900

How INDIRECT works

INDIRECT takes text and treats it as a reference. =INDIRECT("B4") returns whatever is in B4. The useful part is that the text can be built from other cells, so the reference can change without editing the formula: =INDIRECT("B"&A9) reads column B at the row number held in A9.

The arguments

  • ref_text is the text to convert. It can be a cell address, a range such as "C2:C"&A9, a defined name, or a reference to another sheet written as text, such as "'"&A2&"'!B5". Text that doesn't make a valid reference returns #REF!.
  • a1 chooses the notation. Leave it out for A1 style. FALSE reads the text as R1C1, where "R4C2" means row 4, column 2.

Why INDIRECT is volatile

INDIRECT is a volatile function. Most formulas recalculate only when a cell they depend on changes. A volatile one recalculates every time Excel recalculates anything in the workbook. Excel has no way to know which cells an INDIRECT will read until it builds the text, so it can't tell which edits matter and recalculates it every time. Every formula that depends on an INDIRECT then recalculates too.

In a small workbook you won't notice. In a large model with hundreds of INDIRECTs, editing becomes slow, and Excel treats the file as changed after every recalculation.

Other drawbacks

  • The reference is just text, so Excel doesn't maintain it. If you insert a row, delete a column or rename a sheet, a plain reference like B4 updates automatically, but the "B4" inside INDIRECT doesn't. The formula keeps pointing at the old address and returns the wrong answer without an error.
  • It is hard to audit. Trace Precedents can't show what an INDIRECT reads.
  • It can't read a closed workbook. Pointing at another workbook that isn't open returns #REF!.

When to avoid it

Avoid INDIRECT when the target is known in advance or can be reached another way: INDEX picks a cell by position, CHOOSE picks between a few ranges, and XLOOKUP or INDEX with MATCH look values up without building addresses. Avoid it in large or shared models, and whenever the layout is likely to change.

When it is reasonable

  • Dependent drop-downs. A Data Validation list of =INDIRECT(A2) shows the named range whose name is in A2. It remains the usual approach for dependent lists in older versions of Excel.
  • The same cell on many sheets. =INDIRECT("'"&A2&"'!B5") reads B5 from the sheet named in A2, which is handy for a summary over sheets with identical layouts.
  • Quick one-off tools where the cost and risks above don't matter.

Arguments

ref_text
Text that spells out a reference, such as "B4" or "C2:C"&A9, or the name of a defined range. If the text isn't a valid reference, INDIRECT returns #REF!.
a1optional
TRUE, or leaving it out, means ref_text is in A1 style such as B4. FALSE means R1C1 style such as R4C2.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Read a cell from its address in text

D5 =INDIRECT(D2)

Result: 42,900

D2 holds the text B4. INDIRECT turns it into a reference to B4 and returns the value there. Change D2 to B3 and the result follows.

D5
A
B
C
D
1
Region
Revenue
Cell to read
2
North
48,200
B4
3
South
31,750
4
East
42,900
Value
5
West
37,400
42,900
6
7
8

D5 =INDIRECT(D2) returns 42,900

Example 2

Build the address from a row number

D5 =INDIRECT("A"&D2)

Result: West

The text "A" joined to 5 is "A5", which INDIRECT reads as a reference. The same result is available from INDEX(A1:A5, D2) without being volatile.

D5
A
B
C
D
1
Region
Revenue
Row number
2
North
48200
5
3
South
31750
4
East
42900
Region
5
West
37400
West
6
7
8

D5 =INDIRECT("A"&D2) returns West

Example 3

Sum a range whose length comes from a cell

D5 =SUM(INDIRECT("B2:B"&D2))

Result: 122,850

The text is "B2:B4", so SUM adds 48,200, 31,750 and 42,900. With D2 changed to 5, the range extends to include West.

D5
A
B
C
D
1
Region
Revenue
Last row
2
North
48,200
4
3
South
31,750
4
East
42,900
Total to that row
5
West
37,400
122,850
6
7
8

D5 =SUM(INDIRECT("B2:B"&D2)) returns 122,850

Example 4

Use a defined name held in a cell

D5 =SUM(INDIRECT(D2))

Result: 68

D2 holds the text South, which is also the name of the range B2:B4. INDIRECT returns that range and SUM adds it. The names must match the text exactly.

D5
A
B
C
D
E
1
North
South
Team
2
18
22
South
3
24
19
4
21
27
Total
5
68
6
7
8

D5 =SUM(INDIRECT(D2)) returns 68

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In E2, return the Units value from column B at the row number in D2, using INDIRECT to build the address.

Answer in E2.

E2
A
B
C
D
E
F
1
Product
Units
Row number
2
Gloves
420
4
3
Pallet wrap
128
4
Tape
310
Total up to row
5
Labels
95
5
6
Bin liners
260
7
8
9
10
11
12

Common mistakes

  • INDIRECT is volatile: it recalculates on every change in the workbook, and so does everything that depends on it. A large model with many INDIRECTs becomes slow.
  • The address is text, so Excel doesn't update it when you insert or delete rows and columns or rename a sheet. The formula keeps reading the old address and gives the wrong answer silently.
  • A reference to another sheet needs the sheet name in single quotes when it has spaces, such as "'"&A2&"'!B5". A missing quote returns #REF!.
  • INDIRECT can't read a workbook that is closed. The result is #REF! until the other file is opened.
  • Trace Precedents can't show what an INDIRECT reads, so colleagues can't easily audit the formula.

Questions people ask

Why is INDIRECT volatile?

Excel can't know which cells it will read until the text is built, so it can't tell which edits matter and recalculates it, and everything that depends on it, on every calculation.

Why does INDIRECT return #REF!?

The text isn't a valid reference. Common causes are a missing quote around a sheet name that has spaces, a misspelt sheet or range name, a reference to a closed workbook, or an empty cell as ref_text.

What can I use instead of INDIRECT?

INDEX for a cell by position, CHOOSE to pick between a few ranges, and XLOOKUP or INDEX/MATCH for lookups. For data spread across many identical sheets, consider consolidating it into one table instead.

Can INDIRECT refer to another sheet?

Yes. Build the address as text, including the sheet name: `=INDIRECT("'"&A2&"'!B5")`. It keeps working only while the sheet name matches the text exactly, and Excel won't update the text if the sheet is renamed.

How do I make a dependent drop-down with INDIRECT?

Name each list after its category, then set the second cell's Data Validation list source to `=INDIRECT(A2)`, where A2 is the first drop-down. The list names can't contain spaces.

Learn INDIRECT in a real sheet.

Tracks take you from the basics to modelling, one graded exercise at a time.