+ Reply to Thread
Results 1 to 3 of 3

Macro to copy a range to first empty row on another sheet

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Macro to copy a range to first empty row on another sheet

    Edit: The Macro below is now working for the copy, I had misspelled the sheet name tab...duh !
    however I'd still appreciate your help on the other bits please

    I've tried various macro's I've found, but can't get them to do what I need, such as..

    Private Sub UpdateData()
    
    Sheets("Sheet1").Range("b6:I6").Copy
    
    Dim lastrow As Long
    lastrow = Range("A65536").End(xlUp).Row
    
    Sheets("Sheet2").Activate
    Cells(lastrow + 1, 1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    
    End Sub
    I need a macro to copy Values only from sheet1 B6:I6 to the first Empty row on sheet2 A to H

    It would also be helpful that if after copying, on sheet1 Cells b6:c6 and b9:g30 and j6 the contents were cleared.
    Additionally, rows on sheet2 a2 onwards to be sorted alphabetically on a2
    any help would be appreciated

    Many thanks
    Last edited by sipa; 01-11-2017 at 08:41 AM.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,309

    Re: Macro to copy a range to first empty row on another sheet

    Private Sub UpdateData()
        Sheets("Sheet1").Range("b6:I6").Copy
        Sheets("Sheet2").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues)
        
        Sheets("Sheet1").Range("b6:c6").ClearContents
        Sheets("Sheet1").Range("b9:g30").ClearContents
        Sheets("Sheet1").Range("j6").ClearContents
    End Sub

  3. #3
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: Macro to copy a range to first empty row on another sheet

    Thanks for the help Dangelor

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy range to next empty row in a table on another sheet with VBA
    By vicguz33 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2015, 05:02 AM
  2. [SOLVED] copy range and paste values only to another sheet in next empty row
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2015, 05:08 AM
  3. Copy Range from Sheet A then find the next empty row in sheet B
    By clowesr in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-02-2014, 05:42 PM
  4. Replies: 0
    Last Post: 03-20-2014, 11:51 AM
  5. [SOLVED] Macro to Copy Range and Paste in the Empty Row Same Sheet
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-22-2013, 11:01 AM
  6. Replies: 1
    Last Post: 04-22-2013, 10:34 AM
  7. Copy data from one sheet to another in the first empty column in a given range
    By timisoara in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-16-2013, 10:53 AM

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