An example:
H1 contains =AR90
AR92 =$2.41
I want K1 to reference the cell AR92. (2 to the right of the cell location contained in H!
Offset can get me to AR92, but I don’t know how to reference the contents of cell H1
An example:
H1 contains =AR90
AR92 =$2.41
I want K1 to reference the cell AR92. (2 to the right of the cell location contained in H!
Offset can get me to AR92, but I don’t know how to reference the contents of cell H1
You can convert text to cell address reference using INDIRECT function - Documentation/How Tos/Calc: INDIRECT function - Apache OpenOffice Wiki
For example, INDIRECT(H1)
will return reference to AR90 cell and you can use it in OFFSET to modify reference:
OFFSET(INDIRECT(H1);2;0)
This will return you a contents of AR92.
I’m afraid it would only work if H1
contained text “AR90”, not formula “=AR90”.
In general, you cannot tell which cells are referenced in a cell’s formula. You think of the formula “=AR90” as if this makes H1 a “mirror” of AR90. But remember that this formula is just a simplest case, and in general, formulas are more involved. Take this: “=AR90+BR91”. Is there now a single reference from such a formula? And the simplest case isn’t treated any different than any complex formulas.
You could take the formula from a cell, and parse it (like removing the leading “=” and possible leading/trailing spaces), and use the resulting string in the INDIRECT as suggested by @SM_Riga, in the hope that it would happen to be the address. Or you could choose to put the adderss to the AR90 as text, not as formula.