+ Reply to Thread
Results 1 to 11 of 11

Copy specific range from one sheet and paste to next available row of different sheet

Hybrid View

  1. #1
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello koklok,

    This macro will paste only the values from the Range("A3:H6") on "Step 1" to the next empty row on "Step 2". Copy this code and paste it into a VBA module in your project.
    Sub CopyData()
    
        Worksheets("Step 1").Range("A3:H6").Copy
        Worksheets("Step 2").Cells(Rows.Count, "A").End(xlUp).PasteSpecial Paste:=xlPasteValues
        
    End Sub
    Sincerely,
    Leith Ross

  2. #2
    Registered User
    Join Date
    10-08-2008
    Location
    Hallandale
    Posts
    44
    Leith,

    Thanks for your help but there seems to be a small glitch.
    When range A3:H6 is pasted to sheet(step2), my last row has underscore in the last row and that's good, but when I run a macro for the 2nd time range pastes over the underscore.
    So the bottom line is that every time I run a macro it pastes over the last row of previous macro.

    I appreciate your help

    Thanks

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello koklok,

    This should fix the problem...
    Sub CopyData()
    
        Worksheets("Step 1").Range("A3:H6").Copy
    
        With Worksheets("Step 2")
          .Cells(Rows.Count, "A").End(xlUp)Offset(1,0).PasteSpecial Paste:=xlPasteValues
        End With
    
    End Sub
    Sincerely,
    Leith Ross

  4. #4
    Registered User
    Join Date
    10-08-2008
    Location
    Hallandale
    Posts
    44

    Re: Copy specific range from one sheet and paste to next available row of different s

    Unfortunately it's still not working

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Copy specific range from one sheet and paste to next available row of different s

    Hello koklok,

    When I run the macro below, the underscore is copied. Can you be more specific about the problem?
    Sub CopyData()
    
        Worksheets("Step 1").Range("A3:H6").Copy
        Worksheets("Step 2").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
        
    End Sub
    Sincerely,
    Leith Ross

  6. #6
    Registered User
    Join Date
    10-08-2008
    Location
    Hallandale
    Posts
    44

    Re: Copy specific range from one sheet and paste to next available row of different s

    Ok, Leith

    I see you made a little change and it's working now I appreciate your help.

    Thanks

+ 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