# How can a function that expects a cell reference use it own cell's coordinates automatically?

The CELL() function allows one to construct a reference from a target cell, like:

``````=CELL("ADDRESS", A1)
``````

will return the string `\$A\$1`.

Other functions, like OFFSET() and more, expect a cell reference as one of their arguments.

How can I tell the function to use the current cell's reference as an input? Something in the spirit of:

``````=CELL("ADDRESS", @)
=CELL("ADDRESS",)
``````
• That would give a circular reference, which is nonsense. The value of the cell could not be computed until the value of the cell is first computed, which would then cause the value of the cell to be recomputed ad infinitum. – psusi Apr 16 '12 at 2:48

## 2 Answers

You can do something like this way:-

``````=ADDRESS(ROW(),COLUMN())
``````

## Result:

``````\$A\$1
\$A\$2
\$A\$3
\$A\$4
\$A\$5
\$A\$6
``````
• Yes, this is what I have so far as my best effort. I wish there was a "here" object or symbol to do this. – ysap Apr 16 '12 at 14:27

This seems to work although the indirect in itself is a circular reference

``````=CELL("ADDRESS",INDIRECT("RC",FALSE))
``````
• Can you explain (or give a link to) how the "" syntax work? The "RxCy" address syntax is absolute, IIRC. – ysap Apr 16 '12 at 14:28
• Actually I have looked a little and not found a reference but it seems to work much as OFFSET. In fact =CELL("ADDRESS",INDIRECT("RC",FALSE)) seems to work the same, referring to the active cell, try substituting -1 or +2 etc to see the behavior – datatoo Apr 16 '12 at 21:18
• The R[x]C[y] does works, surprisingly, for relative offsets. R[-1]C will reference the cell on the above row, two cells to the right. – ysap Apr 17 '12 at 8:32
• Here's a reference (this is the online version of the Excel help): office.microsoft.com/en-us/excel-help/… – ysap Apr 17 '12 at 9:37