Results 1 to 7 of 7

Copying specific cells from worksheet to activesheet

Threaded View

  1. #1
    Registered User
    Join Date
    06-05-2007
    Posts
    81

    Copying specific cells from worksheet to activesheet

    Good afternoon,
    I'm trying to "export" data from a static ws "order" (Sheet2) to a selected (active) worksheet. This will happen with 15 different (random) cells. I got this far but the copying isn't happening from the correct sheet or going to the active sheet. The data in "G5" on "order" should go to the first unused row on the active sheet. What I got was backwards. (Once I get the first one to work I can finish the code for the other 14 cells. I appreciate getting pointed in the right direction. I tried to tweak something that was going the other way - probably all wrong.)
    Private Sub Export_Click()
        Dim LR As Long
        LR = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
        With Sheet2
            'G5 to col 1, G6 to col 2, G7 to col 3, I7 to col 4, K7 to col 5,D2 to col 7
            Range("G5").Value = Sheets("Order").Cells(LR, 1).Value
            Range("G6").Value = Sheets("Order").Cells(LR,2).Value
            etc....
            End With
    End Sub
    Last edited by pprseller; 10-30-2009 at 06:29 PM.

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