asked on
Excel VBA to Import all worksheets in all spreadsheets a folder into 1 single spreadsheet
Dear Experts
In Excel, I am trying to create a macro to import all the worksheets in all the spreadsheets (.xlsx) that are saved in a folder into 1 single spreadsheet called ‘Results.xlsx’.
This is basically to automate a process which sees us downloading whatever data is available from pour source into separate spreadsheets & then use a template spreadsheet (the ‘Results.xlsx’) to consolidate the results & create graphs etc.
There are typically around 10-12 spreadsheets to import and each spreadsheet has 2 worksheets, one of which is called overview, the other has a unique name – I am not bothered about the worksheet called ‘Overview’ – this can either be ignored or overwritten as any code loops through.
The folder in question is the current folder path of the results spreadsheet for example:
C:\Users\tomcr\OneDrive\Desktop\Downloads\Results.xlsx
C:\Users\tomcr\OneDrive\Desktop\Downloads\To be imported (1).xlsx
C:\Users\tomcr\OneDrive\Desktop\Downloads\To be imported (2).xlsx
C:\Users\tomcr\OneDrive\Desktop\Downloads\To be imported (3).xlsx
C:\Users\tomcr\OneDrive\Desktop\Downloads\To be imported (4).xlsx
C:\Users\tomcr\OneDrive\Desktop\Downloads\To be imported (5).xlsx
Can anybody help?
ASKER
ASKER
Thanks!
Thanks. I will try and get a hold of a windows machine.
CombineSheets2.xlsm
This workbook contains content that isn't supported in this version of Excel.
".ActiveX"
>> that got all workbooks into one sheet with several tabs.
That's what Tom had asked for. If you need something different, it would probably be best if you started a new question.
Open in new window
RecursiveFileAppender April 2016.xlsm