+ Reply to Thread
Results 1 to 6 of 6

Copy multiple batches of data using VBA

  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)

    Please Login or Register  to view this content.
    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

    Please Login or Register  to view this content.
    To function as:

    Please Login or Register  to view this content.
    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.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy multiple batches of data using VBA

    I do not know what is the purpose of

    YouLikeToPasteTo = "A1"

    With .Range(YouLikeToPasteTo)

    Means you are copying the selected range in A1.
    You are also copying 2 rows 1 (A1:C2 ) Only.

    I do not know what are trying to do, but a simplified version of your code.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy multiple batches of data using VBA

    Your post contradicts your example workbook. In your post you say Range "E1" but in your workbook E1 is blank. You show J1 in your code, but J1 is blank. I will assume that you meant Sheet1 Range F1.

    Please Login or Register  to view this content.
    Edit: Darn it AB33, beat me again

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

    Re: Copy multiple batches of data using VBA

    That's perfect thanks I got it working with
    Please Login or Register  to view this content.

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

    Re: Copy multiple batches of data using VBA

    Quote Originally Posted by stnkynts View Post
    Your post contradicts your example workbook. In your post you say Range "E1" but in your workbook E1 is blank. You show J1 in your code, but J1 is blank. I will assume that you meant Sheet1 Range F1.

    Please Login or Register  to view this content.
    Edit: Darn it AB33, beat me again
    Sorry think I may have accidentally attached the wrong workbook! Sorted now though thanks anyway.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy multiple batches of data using VBA

    stnkynts,
    Nowadays, I am trying to play as poacher, not a mid-fielder,despite a football game is lost and won on midfield.

+ 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. [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