+ Reply to Thread
Results 1 to 2 of 2

Inefficient Macro - Copying data into a masterfile

  1. #1
    Registered User
    Join Date
    08-22-2015
    Location
    England
    MS-Off Ver
    Windows 9
    Posts
    1

    Inefficient Macro - Copying data into a masterfile

    Hi all,

    I have set up a macro to import data from two sets of columns in several workbooks into one master workbook.
    his is my first time creating a macro, and as you can see from below it is not very efficient. I am looking for any tips on how I can improve it, as I need to import data from 25 workbooks into one.

    To summarise the code does the following:
    1. Copies the data in the column that contains the ID numbers ("Workbook A")
    2. Paste them in the masterfile
    3. Copies the data in the column that contains the date ("Workbook A")
    4. Paste them in the masterfile
    5. Repeats the process in the next workbook, and paste it in the masterfile underneath the data from step 2/4.

    The workbooks are formatted differently, so it is not always the same column that is being copied over.

    As you can see, my below code is just mimicking how the process would be carried out manually. Any tips on how to improve it would be appreciated.

    Please Login or Register  to view this content.
    Additionally: I would also like the rows in column A in the Masterfile to be populated based on the name of the sourcefile, how can I make a code to do this? Bearing in mind that this needs to correspond with the amount of rows that I have imported from that particular sourcefile.

    Any help and tips would be greatly appreciated!

  2. #2
    Registered User
    Join Date
    04-20-2013
    Location
    Woking, England
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    34

    Re: Inefficient Macro - Copying data into a masterfile

    Cross-posted here - http://www.mrexcel.com/forum/excel-q...asterfile.html
    Mike

+ 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. Replies: 3
    Last Post: 08-15-2015, 05:26 AM
  2. Copying data across workbooks in the same folder to masterfile
    By venice.may1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2015, 12:40 PM
  3. Inefficient code - macro takes too long
    By dantray02 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-07-2014, 09:29 AM
  4. [SOLVED] Inefficient 'select sheets' macro - needs improving pls!
    By TheRobsterUK in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2013, 06:46 AM
  5. Macro to get data from individual files and add it into one common masterfile
    By lfmemp in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-04-2012, 05:06 AM
  6. [SOLVED] Optimize a large inefficient macro
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-05-2011, 09:11 AM
  7. Inefficient macro won't complete
    By Fox via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2006, 03:45 PM

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