What is the INDIRECT function?
=INDIRECT(ref_text, [a1])INDIRECT turns an address written as text, such as "C5", into a real reference and returns that cell's value.
You can build the address from other cells or with &, so it is used to change the sheet name or row number being referenced. Check on the sheet above which cell the address text points to.
Arguments
- ref_text
- Text containing a cell or range address.
- a1
- TRUE (omitted) reads A1 style, FALSE reads R1C1 style. This playground handles A1 only.
INDIRECT examples
Example 1. Basic
=INDIRECT("C5")The value in C5, 6900.
Example 2. Build an address
=INDIRECT("C"&E1)If E1 is 5, it refers to C5.
Example 3. Sum a range
=SUM(INDIRECT("C2:C4"))1500+2300+3200 = 7000.
Example 4. Another sheet
=INDIRECT("'"&A1&"'!B2")Refers to B2 on the sheet named in A1.
Common mistakes
Missing quotes
=INDIRECT(C5) reads the text in cell C5 as an address. To pass the address itself, put it in quotes: "C5".
Slower calculation
INDIRECT recalculates whenever the sheet changes, so heavy use can slow a file down.
FAQ
- Can it refer to a closed workbook?
- No. If the target workbook is closed, you get #REF!.
- What if the address is invalid?
- You get #REF!.