Forum Discussion
Alincristi
Oct 29, 2019Copper Contributor
Search a text into a folder containing worksheets with different names and copy values
Hello all, I am searching for a solution in excel to search for some data into a specific folder which contains more worksheets with different name and if the text is fount to copy the data into ano...
Patrick2788
Oct 29, 2019Silver Contributor
I see two ways to do it.
1. INDIRECT - the drawback is INDIRECT doesn't like closed workbooks. The files would need to be open to pull the data.
2. VBA - the best solution. Write a loop to open the workbooks, fetch the data, and return the values to the desired sheet.
- AlincristiOct 29, 2019Copper Contributor
Patrick2788 Thank you for your quick reply.
I tried to look at the VBA option, but i am at the beginning with the VBA and didn't figure it out how to do it.
- Patrick2788Oct 29, 2019Silver Contributor
I'd do it in two parts. The first part presents you with an open dialog to select the files. The next part writes each open files' data to your sheet. Just need to know the cell addresses in each workbook and where to write the data in the destination file.