Importing Files from folders

ypurcaro

New member
Joined
Feb 17, 2019
Messages
3
Reaction score
0
Points
0
Excel Version(s)
2010
Hello All
So, I bought the book M is for (Data) Monkey. I've finished chapter 4 now and I have done the exercises. I love the book very much because the content is straightforward. But, I have a question and don't know how to apply the chapter four information to this.

I know how to import the files from a folder and do the formatting. However, this is what I get stuck here.

I have to do this every month. I used these 2 files, merged together and provide me the information I need. Lets say I have a file named "OTIF REPORT" and one file named "CODE". What I need to do is to apply the code to the OTIF Report. The OTIF REPORT file saved in a folder called OTIF and the CODE file saved in the subfolder called "CODE". Everything looks fine and I'm happy with that. However, next month, I'll receive a fresh file and saved in the folders. Now, what do I need to do if I don't want to create the connection and query all over again? Somebody told me to create a parameter and use the Get Function. Do we have a different way to do this? Just curious.

Thanks.
 
Perhaps sort the folders by date and take the most recent file .
 
I thought about that too..but my files in two different locations, they are not in the same folders. Do you think that will work?
 
I'd set up two queries to use the From Folder method as Norm mentioned. You can then target each folder to extract the most recent workbook from each and then append/merge those two queries as needed.
 
Back
Top