+ Reply to Thread
Results 1 to 4 of 4

address of active cell

  1. #1
    Forum Contributor
    Join Date
    06-21-2004
    Posts
    106

    address of active cell

    I have a cell (ie. c1). How do I make it show the address of the active cell in the worksheet? So, if I click on A1, it will show a1.

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    What is it you are trying to accomplish with this? When you click in a cell (making it the 'Active Cell'), the address of the cell is displayed in the 'Name Box' (just to the left of the Formula bar).

    It would require VBA code to insert the cell reference within the cell when clicked. What would you do with a cell that already has data or a formula in it?

    The formula: =CELL("address",A1) returns $A$1 in that cell.

    More info, please.
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Forum Contributor
    Join Date
    06-21-2004
    Posts
    106
    Quote Originally Posted by swatsp0p
    What is it you are trying to accomplish with this? When you click in a cell (making it the 'Active Cell'), the address of the cell is displayed in the 'Name Box' (just to the left of the Formula bar).

    It would require VBA code to insert the cell reference within the cell when clicked. What would you do with a cell that already has data or a formula in it?

    The formula: =CELL("address",A1) returns $A$1 in that cell.

    More info, please.

    Once the cell is clicked, I can do a vlookup on a table I will create to display text, depending on which cell is clicked. I do not like the comment or validation option to display text, so I am trying it this way.
    So, =CELL() will not work because it doesn't tell me which cell the user has selected.

  4. #4
    Forum Contributor
    Join Date
    06-21-2004
    Posts
    106
    I got the solution:


    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    Worksheets("Sheet1").Range("A1").Value = _
    Target.Cells(1).Address


    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1