jackjones123
New Member
- Joined
- Sep 26, 2019
- Messages
- 4
Hi,
I'm looking to pull the contents of multiple workbooks into one, and found this old thread, the first reply works perfectly:
https://www.mrexcel.com/forum/excel...file-folder-copy-data-into-open-workbook.html
However, that macro populates the summary sheet top-to-bottom whereas I want to populate it left-to-right, ie a new column for each workbook. So I need to reference the column by number.
I've tried changing rowTarget to iCol and changing ".Range("A" & rowTarget).Value = wsSource.Range("C2").Value" to ".Range(iCol & 1).Value = wsSource.Range("C2").Value" but not only does not populate, the macro just seems to open the first workbook and then do nothing. I've tried a few different variations but I'm getting nowhere.
Can anyone tell me what I need to do to make this work?
I'm looking to pull the contents of multiple workbooks into one, and found this old thread, the first reply works perfectly:
https://www.mrexcel.com/forum/excel...file-folder-copy-data-into-open-workbook.html
However, that macro populates the summary sheet top-to-bottom whereas I want to populate it left-to-right, ie a new column for each workbook. So I need to reference the column by number.
I've tried changing rowTarget to iCol and changing ".Range("A" & rowTarget).Value = wsSource.Range("C2").Value" to ".Range(iCol & 1).Value = wsSource.Range("C2").Value" but not only does not populate, the macro just seems to open the first workbook and then do nothing. I've tried a few different variations but I'm getting nowhere.
Can anyone tell me what I need to do to make this work?