Copy data from Multiple workbooks into One

  • Hello,


    i want some help with VBA code.


    i have few workbooks & want to move the data from the different workbooks into one master file.


    the files are in different location & all have the same headers.


    i want to be able to copy the data & paste into the master without overlapping into the other data & also do a paste special while pasting it into the master file.


    Thank you for the assistants.

  • When you say that the files are in different locations, does that mean they are in different folders? Do you want to copy data from all the sheets in the source workbooks or from just one sheet? Do you want to copy the entire sheet or only part of it? Where in the Master do you want to paste the data, all in one sheet or in separate sheets?

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Hello Mumps


    The files are in different folder & the master in a different.
    All the data in the files are stored in sheet 1 & i want the entire sheet data to be placed in sheet 1 of master files, but i don't want the data to be overlapped with the others.
    the data from the source file should be placed as values in the master excel.


    Thank you for your time

  • Place this macro in a regular module in your destination workbook and run it from there. Make sure this workbook contains a sheet named "Master". Save the workbook as a macro-enabled file. Since your files are in different folders, you will be prompted to choose a folder and a file to open.

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • You are very welcome. :)

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Place this macro in a regular module in your destination workbook and run it from there. Make sure this workbook contains a sheet named "Master". Save the workbook as a macro-enabled file. Since your files are in different folders, you will be prompted to choose a folder and a file to open.


    Hi Mumps,


    I could really use your help. This macro does exactly what I need it to do, but I could use some help tweaking it so that it processes all files within the folder without me having to select each file and leaves out the first line as they are headers. Is this possible?


    I fully realise that I'm piggy backing off your hard work, but it's a gem of a macro and will save me a lot of time.


    Many thanks,
    Gretel

  • Gretel: Welcome to the Forum. According to Forum rules, you should not post your question in another person's thread. Please start a new thread explaining exactly what you want to do. Also, it would make it easier to help if you attach a copy of your file. Once you have started a new thread, send me a private message with a link to the thread and I will be glad to have a look at it. Include a link to this thread if you feel it is useful. :)

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!