Difference between revisions of "Documentation/How Tos/Calc: INDIRECT function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(→See also:) |
(→Issues:) |
||
Line 30: | Line 30: | ||
=== Issues: === | === Issues: === | ||
− | * | + | *Excel represents some cell references differently to Calc, so this function is not always portable. For example INDIRECT("Sheet2.A1") is valid in Calc, but in Excel the required form is INDIRECT("Sheet2!A1"). |
− | *Named cells/ranges | + | *Excel's version of this function optionally allows an R1C1-style reference. |
+ | *Named cells/ranges are recognised in Calc from OOo2.4 (see Issue 4695). |
Revision as of 20:22, 15 September 2008
INDIRECT
Returns a reference, given a text string.
Syntax:
INDIRECT(textref)
- textref is a text string specifying the reference to be returned; the reference may be to a single cell or to a range.
- The reference may then be used in formulae or functions requiring a reference - see the examples below.
Example:
=INDIRECT("B2")
- (in a cell) returns the contents of cell B2. INDIRECT("B2") returns a reference to cell B2, so this is the same as =B2.
=INDIRECT("B" & "2")
- also returns the contents of cell B2. "B" & "2" becomes the text string "B2".
=SUM(INDIRECT("A1:C3"))
- returns the sum of the numbers in A1:C3.
See also:
Functions listed alphabetically, Functions listed by category
Issues:
- Excel represents some cell references differently to Calc, so this function is not always portable. For example INDIRECT("Sheet2.A1") is valid in Calc, but in Excel the required form is INDIRECT("Sheet2!A1").
- Excel's version of this function optionally allows an R1C1-style reference.
- Named cells/ranges are recognised in Calc from OOo2.4 (see Issue 4695).