mrsbunnybunny1
New Member
- Joined
- Aug 12, 2022
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
I have about 50 files with data in columns A through G. All 50 files have different names but data is in worksheets named all the same. I am trying to get a VBA code to:
1. Open each of the 50 files.
2. copy columns c and e of file 1, Sheet 1
3. paste in the master workbook Sheet 1
4. copy columns c and e of file 2, Sheet 1
5. paste in the master workbook Sheet 1 to the right of the columns from file 1
6. copy columns c and e of file 3, Sheet 1
7. paste in the master workbook Sheet 1 to the right of the columns from file 2
[and so on and so forth until there are no more files]
8. copy columns c and e of file 1, Sheet 2
9. paste in the master workbook Sheet 2
10. copy columns c and e of file 2, Sheet 2
11. paste in the master workbook Sheet 2 to the right of the columns from file 1
[and so on and so forth until there are no more files and do so until there are no more sheets]
All can be value paste.
Can this be done? Thanks in advance.
1. Open each of the 50 files.
2. copy columns c and e of file 1, Sheet 1
3. paste in the master workbook Sheet 1
4. copy columns c and e of file 2, Sheet 1
5. paste in the master workbook Sheet 1 to the right of the columns from file 1
6. copy columns c and e of file 3, Sheet 1
7. paste in the master workbook Sheet 1 to the right of the columns from file 2
[and so on and so forth until there are no more files]
8. copy columns c and e of file 1, Sheet 2
9. paste in the master workbook Sheet 2
10. copy columns c and e of file 2, Sheet 2
11. paste in the master workbook Sheet 2 to the right of the columns from file 1
[and so on and so forth until there are no more files and do so until there are no more sheets]
All can be value paste.
Can this be done? Thanks in advance.