+ Reply to Thread
Results 1 to 5 of 5

How to make a different cell equal active cell

Hybrid View

  1. #1
    Registered User
    Join Date
    05-14-2012
    Location
    Alaska, USA
    MS-Off Ver
    Excel 2007
    Posts
    31

    How to make a different cell equal active cell

    Hi,
    I'm looking for a way to do the following:
    when I click on a cell in the active sheet, I want a different sheet in the workbook to have one single cell that equals the cell i just clicked, no matter where it may be.

    thanks for the help if you can.
    Last edited by Jaron_t; 11-27-2012 at 06:30 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,289

    Re: How to make a different cell equal active cell

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    
    If Target.Cells.Count > 1 Then Exit Sub
    Sheet2.Range("A2") = Target.Value
    
    End Sub

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    05-14-2012
    Location
    Alaska, USA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: How to make a different cell equal active cell

    Thanks. Now, the actual sheet names I have are different, so I tried modifying as follows:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    If Target.Cells.Count > 1 Then Exit Sub
    Sheet("Employee Info").Range("N1") = Target.Value

    End Sub


    Evidently thats not right.

  4. #4
    Registered User
    Join Date
    05-14-2012
    Location
    Alaska, USA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: How to make a different cell equal active cell

    Oh wait, here it is:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    If Target.Cells.Count > 1 Then Exit Sub
    Worksheets("Employee Info").Range("N1") = Target.Value

    End Sub


    That works, thanks for the help.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,289

    Re: How to make a different cell equal active cell

    Sheets not Sheet

+ 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