Populating one cell with the physcial location of a different cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi - I'm trying to write code which will essentially populate one cell with
the physcial location (ie - 'A10') of another cell. A simple example is:

I want to create a variable so that I can set the variable to capture the
physical location of cell A10 and then populate cell C17 with 'A10'
(literally so that the text within cell C17 says 'A10').

Any help on how to do this is much appreciated!!

Rob
 
Hi - I'm trying to write code which will essentially populate one cell with
the physcial location (ie - 'A10') of another cell. A simple example is:

I want to create a variable so that I can set the variable to capture the
physical location of cell A10 and then populate cell C17 with 'A10'
(literally so that the text within cell C17 says 'A10').

Any help on how to do this is much appreciated!!

Rob
Try this

Sub PlaceAddress()

ToPlace = ActiveCell.Address
Cells(1, 5).Value = ToPlace

End Sub


Claus Henriksen
 
Claus Henriksen said:
On Wed, 18 May 2005 02:19:03 -0700, "Linking to specific cells in
pivot table"

Sub PlaceAddress()

ToPlace = ActiveCell.Address
Cells(1, 5).Value = ToPlace

If you want it in the form C17, not $C$17, use

Activecell.Address(False,False)
 
Back
Top