I have tried multiple macros and cannot get this to work. It is hard because this need to be very dynamic / hands off for future runs.
Here is what I am dealing with. I have a folder that has 8 files (and in the future could have more). Each of them has one sheet that I need to bring in, and the sheet name is named after the entity ID, which is actually part of the file name. For example, file "1234_hello.xlsx" has a tab called "1234" and that is the tab I need to bring in. Each file has tons of other random tabs, so this makes it more challenging.
Another piece to this is I have a master mapping file because I need to bring in the same columns from each of these tabs, but each file has slightly different names for the columns. So I also need to know where to incorporate the mapping file. Does that go inside or outside of the macro? The mapping file is just 3 columns (Original Name, Entity ID, New Name), so that way all columns can be named the same once the data is brought in. I will need to transpose the data so that the mapping can join correctly.
Eventually I will be doing calculations with these columns, but for now, I really need assistance with setting this up. So far, I have a directory tool that is linked to my folder that has the 8 files. I then had a select tool for "fullpath". From there it got messy.