Results 1 to 6 of 6

Copy multiple batches of data using VBA

Threaded View

  1. #1
    Registered User
    Join Date
    10-27-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    88

    Copy multiple batches of data using VBA

    Somebody very kindly coded me the macro below to copy a portion of a table defined by a cell reference (E1)

    Sub copy()
    
    Dim YouLikeToPasteTo As String
    YouLikeToPasteTo = "A1"
    
    Sheets("Sheet1").Range("A2:C" & _
        1 + Sheets("Sheet1").Range("E1").Value).copy
    
    With Sheets("Sheet2")
        With .Range(YouLikeToPasteTo)
            .PasteSpecial (xlPasteValues)
        End With
    End With
    Application.CutCopyMode = False
    
    End Sub
    I need to try and utilise this to copy data from a number of different tables on sheet1 and consolidate them into a table on sheet2 but I’m having a little trouble, I’m assuming it will be a case of altering the following

    YouLikeToPasteTo = "A1"
    To function as:

    YouLikeToPasteTo = "A” + (“Sheet1”).Range(“J1”).Value.copy
    But not exactly sure how to express this in VBA?

    Attachment 256073
    Attached Files Attached Files
    Last edited by ormerods; 08-07-2013 at 10:14 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How can I multiply in batches?
    By woodysv650 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-22-2013, 06:55 AM
  2. Converting Excel Invoices to PDF in batches
    By brascoeuw in forum Excel General
    Replies: 4
    Last Post: 10-04-2012, 07:37 AM
  3. Minimum or Maximum of a variable by batches
    By liawsiqin@gmail in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2010, 10:18 AM
  4. Formula for expiry batches
    By nasoor123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2010, 04:00 PM
  5. Can't Unhide Rows in 'batches'!
    By raehippychick in forum Excel General
    Replies: 3
    Last Post: 07-20-2005, 10:05 AM

Tags for this Thread

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