views:

173

answers:

1

In an excel cell, I've placed a simple formula

=C4

The cell typically displays the value of cell C4, but instead I want to see the linked cell ID instead, which in this case is "C4".

Is there a formula to show me this? like:

=SHOWCELL(C4)

The reason I need this instead of simply typing the value of "C4" into the cell, is so Excel will maintain the link to the correct cell even if rows are inserted/deleted, AND show me which cell is linked.

+4  A: 

You should be able to use the Cell function.

In Excel, the Cell function can be used to retrieve information about a cell. This can include contents, formatting, size, etc.

=Cell("address", C4)

This displays $C$4.

When inserting a row before C4, it is changed to $C$5.


In case you do not want the $ signs, one way would be the Substitute function:

=Substitute( Cell("address", C4), "$", "" )
Peter Lang
Note that the return value is an absolute address (`$C$4`).
KennyTM
@KennyTM: Right :) I was just extending my answer when you posted your comment, and now I edited it again to provide a solution using `Substitute`.
Peter Lang