rjplante
Well-known Member
- Joined
- Oct 31, 2008
- Messages
- 547
I have a file folder that has several files in them. I also have a list of 12 text strings in range L3:M14 Four of my strings have text in column L and column M, the Text in column L is found at the front of the file name and the text in column M is found at the end of the file name (e.g. L7 contains the text "Mast", and M7 contains "L1L2", L8 contains "Mast", and M8 contains "L3L4". I would like to have a macro that searches the files found in the folder listed in cell C8 for the text in the range L3:M14. When the first one is found I need it to open the file and then execute a specific range copy and paste into my workbook in a defined tab and defined range. Once the first file is done, I need it to close that file and loop through my text range L3:M14 for the file whose filename matches the next item on the list. Most of these files are in pairs and have identical paste ranges, just in a different tab.
What I need is a way to locate a specific file using the search terms in range L3:M14.
Data Table:
Location of files:
What I need is a way to locate a specific file using the search terms in range L3:M14.
Data Table:
Files to extract data from contain: | |
Labels 1 | |
Labels 2 | |
Labels 3 | |
Labels 4 | |
Mast | L1L2 |
Mast | L3L4 |
Tuck | L1L2 |
Tuck | L3L4 |
SOP 1 | |
SOP 2 | |
TrvDate 1 | |
TrvDate 2 | |
Location of files:
Data Folder: | C:\Users\JSmith\Desktop\blank\ | ||||