To find the cell reference of the current cell

  • Thread starter Thread starter Jalaluddin
  • Start date Start date
J

Jalaluddin

I would like to know how to get the cell address of the
current cell.

This is displayed in the left top corner.

for example i want to display the cell address of the
current cell in a specific cell ( say A1), whereas A1
will always display the current cell address
 
use
=cell("address")

this will give the cell address for the current cell.
The cell function also has an optional 2nd parameter.

=cell("Address", A1) will return the address $A$1.
 
I think you may be looking for something else.

Right-click the sheet tab, select View Code. Paste the following into the
worksheet module -

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("A1") = Target.Address
End Sub

HTH,
Andy
 
Back
Top