Dummy Excel
Well-known Member
- Joined
- Sep 21, 2005
- Messages
- 1,004
- Office Version
- 2019
- 2010
- 2007
- Platform
- Windows
Hi All,
I need some help in creating a macro where it opens 20files one at a time from a folder and copies the contents into a blank sheet. When it opens the 2nd file upto 20, it copies from row 2 down (dont need the header again) and appends to the previous data. From files 21 to 40 it does the same thing as 1 to 20 although pastes into sheet 2. THis continues in 20 file blocks until all the files are done.
another way of putting it is:
1) at any blank workbook run macro
2) macro opens first file in C:\temp
3) macro copies data (including header) from the opened file from sheet 1 and pasts into blank workbook then closes the opened file
4) macro opens second file copies data (except for header) and pastes into the bottom of the data of the blank workbook
5) macro does step for upto file number 20
6) macro opens 21st file and copies data including header to sheet 2
7) macro opens files from 22 to 40 and copies data except for header into sheet 2
macro basically opens 20 files and pastes the contests in a sheet, next 20 files into another sheet and so on till all files have been copied.
really appreciate your help
I need some help in creating a macro where it opens 20files one at a time from a folder and copies the contents into a blank sheet. When it opens the 2nd file upto 20, it copies from row 2 down (dont need the header again) and appends to the previous data. From files 21 to 40 it does the same thing as 1 to 20 although pastes into sheet 2. THis continues in 20 file blocks until all the files are done.
another way of putting it is:
1) at any blank workbook run macro
2) macro opens first file in C:\temp
3) macro copies data (including header) from the opened file from sheet 1 and pasts into blank workbook then closes the opened file
4) macro opens second file copies data (except for header) and pastes into the bottom of the data of the blank workbook
5) macro does step for upto file number 20
6) macro opens 21st file and copies data including header to sheet 2
7) macro opens files from 22 to 40 and copies data except for header into sheet 2
macro basically opens 20 files and pastes the contests in a sheet, next 20 files into another sheet and so on till all files have been copied.
really appreciate your help