PDA

View Full Version : Macro to Copy from one Workbook to Another



richardSmith
12-07-2011, 07:55 PM
Hello All...I am new to VBA and am trying to save me some time by programattically performing these actions as opposed to manually doing it each and every time. I think what I need to accomplish make sense, but please let me know if they do not.

I need to be able to open all workbooks listed (there are 10 total workbooks) they are saved at a location of
c:\Excel\Workbooks\"WorkbookName"_Date\"WorkbookName"

So the full path for today's workbook would be:
c:\Excel\Workbook\Workbook1_12072011\Workbook1
c:\Excel\Workbooks\Workbook2_12072011\Workbook2

and so on...

Open the workbooks, and copy the data and formatting (starting in row 3) down to the end (wherever there is no more data, it vary's depending on the workbook)
Oh yes, I only need to copy the data from the 2nd tab which the Worksheet name vary's depending on the workbook, but it will always end in the letters
rt if that helps with the coding of how to copy.

Now that the data has been selected and copied I need to open a seperate workbook located here:
c:\Excel\Workbook\Master_12072011

and paste the data and formatting onto the corresponding worksheet name. Example if the worksheet name was Monday rt in the source workbook, then I would want
paste this data onto the worksheet titled Monday rt in my Master workbook

Tinbendr
12-16-2011, 07:41 AM
Take a look at this. (http://www.rondebruin.nl/merge.htm)