+ Reply to Thread
Results 1 to 3 of 3

Copying column from 200+ workbooks to a master file (already attempted!)

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2013
    Posts
    9

    Copying column from 200+ workbooks to a master file (already attempted!)

    Hi,

    I am new to VBA and looking to be able to automatically generate a master dataset by automatically copying a certain column from ~200 raw data workbooks. These will be accumulating over several weeks. For example, I may have 10 files in week 1, then 20, then 30, etc. I want to be able to drag and drop a new set of Excel data files into a folder with all existing ones, click a button, and have my master Excel updated with all data available to date.

    I have attempted this with 3 workbooks and one master file. If it worked correctly, the data would appear in columns C-E in the master file. However, my code is not working. I am fairly certain at least one of the problems is the way I defined "ecolumn". I also know that my code may not work if any data file is alphabetically after "Master", so if anyone can suggest a fix to that as well, that would be helpful.

    Additionally, I would also eventually like to transpose all of the data so that each data source is a row, if anyone also would be able to help with that.

    I have pasted the module below, and attached the sample files. Could anyone help me with this? Thanks!

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Copying column from 200+ workbooks to a master file (already attempted!)

    Hi RZuban,
    try this (assumes that all the files are located in a single folder)
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-16-2012
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Copying column from 200+ workbooks to a master file (already attempted!)

    Hi Nilem,

    Thanks for your response. I've run into 2 problems.

    1. The macro erases cell A1, so the column header in that cell gets deleted each time I run the code.
    2. The macro does not recognize data which already pasted into the database. If I already have the first 10 lines of data in my master spreadsheet, I do not want this data to be pasted again as duplicates. This is important because I will not have all of my data at once, but rather gathering new data each day to add to existing data.

    I am also having issues adapting my sample template to a larger spreadsheet, but if I can figure out issues #1 and #2 above, then I can focus on that issue.

    It would also be very helpful if you could briefly explain what each line of code is doing. I am going to watch some VBA tutorials to try to understand the syntax better.

    Thank you very much for your help!

+ 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: 2
    Last Post: 09-18-2014, 05:42 AM
  2. Macro- Copying Multiple Workbooks into Master
    By eric.cappelli in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2009, 08:02 AM
  3. Macro- Copying Multiple Workbooks into Master
    By eric.cappelli in forum Excel General
    Replies: 1
    Last Post: 05-13-2009, 07:37 AM
  4. Macro- Copying Multiple Workbooks into Master
    By eric.cappelli in forum Excel General
    Replies: 0
    Last Post: 05-11-2009, 05:32 AM
  5. Macro-copying multiple workbooks into master
    By eric.cappelli in forum Excel General
    Replies: 0
    Last Post: 05-08-2009, 08:12 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