I would like to pull data from a lot of external spreadsheets (50 at present but growing by the week) to a single sheet. I have looked through the forums and although there are some threads covering this I do not really understand the code well enough to adapt it to my own needs.
The external sheets are all on the same drive but never in the same folder. They all have different names. The data I want from the external source is always the same range of cells. In this case S279:BB279.
I have some ideas as to how this can be done but firstly I don't know if they would work and secondly even if they did work I do not know how.
My idea is have the path to the file in column A in Sheet1. I would get this by having a cell in the target file showing the full file path, I know how to do this. I would then Paste value this result in to Column A.
Then have the code run though this list picking up the data and Paste value it from Column B across. The macro trigger would be a change in column A as this would be a file path being paste valued in from the target sheet.
So as I see it there would be a loop going through the file names gathering the data, paste value the data on the same row. I may be way off target here and my logic could be flawed. If there is a better or more logical way to achieve this I would appreciate some help.
I have just thought by writing this out that It could be possible to just check the file path being pasted in instead of running through all files everytime. I have feeling that could be a little slow.
I am trying to avoid having lots of active links that I would get if I just Paste linked the cells along with the hassle that would incur.
Sorry for the long post I am just trying to cover all the bases and help whoever tries to help me.
Thanks lot for looking.
Partjob
The external sheets are all on the same drive but never in the same folder. They all have different names. The data I want from the external source is always the same range of cells. In this case S279:BB279.
I have some ideas as to how this can be done but firstly I don't know if they would work and secondly even if they did work I do not know how.
My idea is have the path to the file in column A in Sheet1. I would get this by having a cell in the target file showing the full file path, I know how to do this. I would then Paste value this result in to Column A.
Then have the code run though this list picking up the data and Paste value it from Column B across. The macro trigger would be a change in column A as this would be a file path being paste valued in from the target sheet.
So as I see it there would be a loop going through the file names gathering the data, paste value the data on the same row. I may be way off target here and my logic could be flawed. If there is a better or more logical way to achieve this I would appreciate some help.
I have just thought by writing this out that It could be possible to just check the file path being pasted in instead of running through all files everytime. I have feeling that could be a little slow.
I am trying to avoid having lots of active links that I would get if I just Paste linked the cells along with the hassle that would incur.
Sorry for the long post I am just trying to cover all the bases and help whoever tries to help me.
Thanks lot for looking.
Partjob