+ Reply to Thread
Results 1 to 12 of 12

Sharing/copying data from 1 file to multiple files (automatically)

  1. #1
    Registered User
    Join Date
    01-28-2014
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    8

    Sharing/copying data from 1 file to multiple files (automatically)

    I am a newbie in excel and would like some help to automatically share the data (in cells A1:A100 - Z1:Z100) entered/saved in the main file to populate multiple files such as File1, File2, etc. The data in columns A and Y of the main file need to be "joined" to form the required data in column K in File4.

    I know most people are looking for the reverse where they want to consolidate data from multiple files into one big file, but I need the opposite.

    Thanks for your help.

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    A sample of the data and the expected results could help immensely...

  3. #3
    Registered User
    Join Date
    01-28-2014
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    8

    Thumbs up Re: Sharing/copying data from 1 file to multiple files (automatically)

    Please see the attached files. The Main file contains all the data which is then distributed to various files (File1, File2, File3 and File4) depending on the column headings. File4's column K contains data joined from columns A and Y of the Main file.

    Thanks!!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    this is very simplistic but works, it assumes that all files are opened and its ready to be
    triggered by a selectchange auto sub
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-28-2014
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    Thanks for your response rcm....sorry if this sounds like a dumb question, but where do I put this "code" of yours, like I said, I am a newbie....and will this work indefinitely until it reaches a blank cell in the main file? So if there are 50 entries, will it stop when it reaches row 51 or try to input "blank" entries into the other files?
    Last edited by DnaDude; 01-30-2014 at 12:58 AM.

  6. #6
    Registered User
    Join Date
    01-28-2014
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    Ok figured out how and where to enter the "code" in excel using the developer tab and running it... I got an error 9... Subscript out of range.....not sure what to do about that??
    Please help in getting rid of the error, thanks rcm for your help!!

  7. #7
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    VBA is very vague with errors but do all mentioned files open ?

    If this goes on permanently then it can be modified to update just the record that has changed

  8. #8
    Registered User
    Join Date
    01-28-2014
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    I had all the files open according to your instructions.....so when I ran the code, all the files closed except for the main file and the main file's data was changed (corrupted the cells... names were replaced with numbers) which is something I was not expecting

    Just to clarify, I am trying to take the data from the main file (one row shown in the main excel file uploaded before) to the various files depending on the column headings as shown in File1, File2, File3 and File4. I hope you can help this problem....thanks rcm!

  9. #9
    Registered User
    Join Date
    01-28-2014
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    still need help with this... thanks.

  10. #10
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    OK. Let me ask questions..
    like I said the code is very simplistic so I may have to twick it a bit

    Are the fields in file1 thru file4 the actual fields that you want to transfer using the real data?
    Is the order of the fields exactly as posted in the example?
    Is Main the only source of information?
    Is this a repetitive action or is it once and done?

    I´m asking all of these questions because the sample file are filled with the macro posted...but your real data might have another structure

  11. #11
    Registered User
    Join Date
    01-28-2014
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    Sorry for the late response....see below for my answers.. Thanks again for your help!



    Quote Originally Posted by rcm View Post
    OK. Let me ask questions..
    like I said the code is very simplistic so I may have to twick it a bit

    Are the fields in file1 thru file4 the actual fields that you want to transfer using the real data? --- Yes
    Is the order of the fields exactly as posted in the example? -- Yes (but what if I needed to change the order of the fields, would I be able to manage that too with a couple of minor changes in the code?)
    Is Main the only source of information? --- Yes
    Is this a repetitive action or is it once and done? --- Repetitive would be ideal; however if I can do it for say 100 entries at a time, clear the Main file and then load it again with more entries, if that is easier to do?

    I´m asking all of these questions because the sample file are filled with the macro posted...but your real data might have another structure

  12. #12
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    The whole process can be automated, as soon as you fill a line it can be automatically transferred to the 4 files and marked as processed . Would that be what you want?

  13. #13
    Registered User
    Join Date
    01-28-2014
    Location
    Earth
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Sharing/copying data from 1 file to multiple files (automatically)

    Clicking a button would be a better option so it can be clicked when ready to transfer the data...if that's more difficult, then the automatic transfer suggestion you mention will work too. Thanks!




    Quote Originally Posted by rcm View Post
    The whole process can be automated, as soon as you fill a line it can be automatically transferred to the 4 files and marked as processed . Would that be what you want?

+ 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. Copying data from multiple files into new one file.
    By Algus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-28-2013, 05:45 AM
  2. Copying data from multiple files in a folder to a master file
    By kjshep in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2012, 12:31 PM
  3. Copying data from multiple files (with mult. sheets) into one file and create a graph
    By Macedonia in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-30-2010, 07:37 AM
  4. [SOLVED] Macro copying info/data in multiple excel files into one summary file.
    By Jskasango in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-06-2006, 03:30 AM
  5. copying contents from multiple files into one file
    By arunjoshi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2005, 04:41 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