Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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",)
share|improve this question
1  
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
add comment

2 Answers

up vote 3 down vote accepted

You can do something like this way:-

=ADDRESS(ROW(),COLUMN())

Result:

$A$1
$A$2
$A$3
$A$4
$A$5
$A$6
share|improve this answer
    
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
add comment

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

=CELL("ADDRESS",INDIRECT("R[0]C[0]",FALSE))
share|improve this answer
    
Can you explain (or give a link to) how the "[0]" syntax work? The "RxCy" address syntax is absolute, IIRC. –  ysap Apr 16 '12 at 14:28
1  
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[2] will reference the cell on the above row, two cells to the right. –  ysap Apr 17 '12 at 8:32
1  
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
    
thanks for the reference that is good to know –  datatoo Apr 18 '12 at 15:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.