dinokovac93
New Member
- Joined
- Oct 10, 2017
- Messages
- 11
Hello everyone,
I'm trying to create a VBA program that will do the following steps
1. Loop through excel files in specified folder
2. Go through each file
3. Search in column B for "INTL" and/or "TRAX"
4. If "INTL" is found in column B, select that cell, move one cell over to column C, and copy all data in that table range (basically pressing Control + A) then paste the data in "original" spreadsheet in the next empty row.
5. If "TRAX" is found in column B, select that cell, move one cell over to column C, and copy all data in that table range (basically pressing Control + A) then paste the data in "original" spreadsheet in the next empty row.
6. If both keywords are found, both sections should be pasted. If only one is found, then only the found one should be pasted.
7. Close file and move to next sheet.
I'm not that good at VBA but I'm trying to learn it. I found a loop VBA code online but I'm having a hard time adding the if statements and actions of copying and pasting. Any help would be appreciated. Please let me know if you need additional info.
I'm trying to create a VBA program that will do the following steps
1. Loop through excel files in specified folder
2. Go through each file
3. Search in column B for "INTL" and/or "TRAX"
4. If "INTL" is found in column B, select that cell, move one cell over to column C, and copy all data in that table range (basically pressing Control + A) then paste the data in "original" spreadsheet in the next empty row.
5. If "TRAX" is found in column B, select that cell, move one cell over to column C, and copy all data in that table range (basically pressing Control + A) then paste the data in "original" spreadsheet in the next empty row.
6. If both keywords are found, both sections should be pasted. If only one is found, then only the found one should be pasted.
7. Close file and move to next sheet.
I'm not that good at VBA but I'm trying to learn it. I found a loop VBA code online but I'm having a hard time adding the if statements and actions of copying and pasting. Any help would be appreciated. Please let me know if you need additional info.