Results 1 to 4 of 4

Macro to move data from sheet1 to sheet2 when clicked

Threaded View

excel77 Macro to move data from... 07-13-2009, 09:36 AM
JBeaucaire Re: Macro to move data from... 07-13-2009, 10:55 AM
excel77 Re: Macro to move data from... 07-14-2009, 04:22 AM
JBeaucaire Re: Macro to move data from... 07-14-2009, 01:18 PM
  1. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to move data from sheet1 to sheet2 when clicked

    Here's a way. We're going to use the trick above to simply give the cell with people's names in it the name "NAME". Then we use that name in the formulas on Sheet1 to draw over the values in relation to their position from the cell currently named "NAME".
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Column = 2 And _
        Target.Row > 4 And _
            Target.Font.Bold = True _
                Then Target.Name = "Name"
    End Sub
    You will have to clean up your value a little. To give the sheet some sense of order, it has to stop listing values at some point or it flows into the next name classes. To stop that from happening, we're evaluating some of the results and once we get 0 we stop.

    That means cells like S40 are a problem and should be moved up to eliminate blank rows inside a single person's lists of classes. If you don't move S40 up to S39, you'll never see it on Sheet1.
    Attached Files Attached Files

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