+ Reply to Thread
Results 1 to 1 of 1

Excel 2007 : How to copy data from multiple excel files to a master excel file without overwriting.

  1. #1
    Registered User
    Join Date
    01-23-2012
    Location
    Groningen, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    4

    How to copy data from multiple excel files to a master excel file without overwriting.

    Hello,

    For a Registration system that I am creating I would like to automate the following:
    In excel file "Bewerksheet.xlsx" on tab "Invoer" I would like to fill cells B2 and C2 with data from another excel file, which is named "week.xlsx"
    Then continue with cells B3 and C3, and so on.
    In this way that first all data in "Week.xlsx" on Tab "maandag" will be copied. when the last entry of tab "maandag" has been copied (Cells A14and B14, then tab "Dinsdag" data should be copied, then "donderdag" and filnally "Vrijdag".
    so from the "maandag" tab cell A2 "week36naam1" with date from cell B2 "5 September 2011" is copied to "Bewerksheet.xlsx" tab "invoer" cells B2 and c3 resp.
    from the "dinsdag" tab week36 naam1 with date 6 september 2011 should then be copied to the first free ceel on the "Bewerkstheet.xlsx" tab "invoer" that would be cell B15 and C15.
    The amount of data on the "week.xlsx" tabs will vary, so the "maandag" tab may have 14 entries, but the "dinsdag" tab may have 20 entries.
    also, as they are week excel files, the "maandag" tab of the next weekfile may have 19 entries, etc, etc.

    I have a Macro (in two parts named "leerling" and "undo") that is doing the trick, but only for one week file.
    When I change "week 36.xlsm" into "week 37.xlsm" in the macro "leerling" the macro will overwrite the first results.

    What I would like is that after "week 36.xlsm" is finished, field B78 of Tab"invoer" is the first empty field
    when I run the leerling macro with "week37.xlsm", the cells b2 and c2 of excel file "Week 37.xlsm" will be copied to B78 and C78 of tab "invoer"
    then cells b3 and c3 of excel file "week 37.xlsm" should be copied to B79 and c79 and so on.

    In "bewerksheet.xlsx" on tab "Gewenst" is shown what I would like to achieve.
    I will add all three excel files and the two parts of my macro with this question.

    Your help is appreciated Greatly!!!
    Kind regards,
    Gradje34
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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