To find the cell reference of the current cell

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
 
J

John

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.
 
A

Andy Brown

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top