EdwardSurrey
New Member
- Joined
- May 13, 2015
- Messages
- 36
- Office Version
- 365
- Platform
- Windows
Hello
Please can I have help creating a macro for copying data from one workbook to another? It needs to search for the column headers and copy the data below it, ignoring the column headers it can't find.
Specifically the following:-
1) The user is in Sheet1 in Workbook A and wants to copy data from Sheet1 in Workbook B.
2) The user can browser for the source file (Workbook B).
3) The first sheet on the source file has data in 20 columns with Headings always in ROW 1. However, the headings are not always in the same column within different source files.
4) The Marco needs to Find column heading and then copy all the data in the column below the heading. (could vary from from 1 to 10,000 rows).
5) If the heading is not there it will just ignore and move onto the next heading to search for.
6) For each heading it finds, it should COPY the data (as values) into the respective column in the Sheet 1 of Workbook A. Let's say there are 5 headings it needs to find (Serial Number, Product Name, Country, IP Address, Site Name).
7) It should then close the source file (Workbook B).
Thanks for reading and/or helping
Ed
Please can I have help creating a macro for copying data from one workbook to another? It needs to search for the column headers and copy the data below it, ignoring the column headers it can't find.
Specifically the following:-
1) The user is in Sheet1 in Workbook A and wants to copy data from Sheet1 in Workbook B.
2) The user can browser for the source file (Workbook B).
3) The first sheet on the source file has data in 20 columns with Headings always in ROW 1. However, the headings are not always in the same column within different source files.
4) The Marco needs to Find column heading and then copy all the data in the column below the heading. (could vary from from 1 to 10,000 rows).
5) If the heading is not there it will just ignore and move onto the next heading to search for.
6) For each heading it finds, it should COPY the data (as values) into the respective column in the Sheet 1 of Workbook A. Let's say there are 5 headings it needs to find (Serial Number, Product Name, Country, IP Address, Site Name).
7) It should then close the source file (Workbook B).
Thanks for reading and/or helping
Ed