View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default A formula for displaying the cell reference of the selected cell

Hi Emma,
as far as I know there isn't a formula that will place the selected
cell's value into A1.
However, if you copy the code below, then right click that worksheet's
Sheet Tab a popup contextual menu appears.
Select "View Code" then paste the copied code into the Sheet's code
module, which is the large white space just below the headings
"(General)" on the left and "(Declarations)" on the right.
Then go Alt + F11 to get back to the worksheet.
Every time you select a different cell on hat sheet the code is run and
the value in A1 will be the value in the selected cell.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells(1, 1) = Target.Value
End Sub

Ken Johnson