Hi;
This merges only the first sheet, right!!, I have files contains a lot of sheets, sometimes I want to merge a specific one, please can you show us how to do it using this tool.
Best Regards.
Hi;
This merges only the first sheet, right!!, I have files contains a lot of sheets, sometimes I want to merge a specific one, please can you show us how to do it using this tool.
Best Regards.
you are right this tools cant allow s you to copy specific sheet but if you want there is a simple macro allow you to do that but you need to edit the path
and the rows manualy.
macro code :
Sub XlsMerger()
Dim bookList As Workbook
'Add 2 new variables for sheets count
Dim index As Integer
Dim mergeObj, dirObj, filesObj, everyObj As Object
Application.ScreenUpdating = False
Set mergeObj = CreateObject("Scripting.FileSystemObject")
Set dirObj = mergeObj.Getfolder("C:\path to folder with excel file\")
Set filesObj = dirObj.Files
For Each everyObj In filesObj
Set bookList = Workbooks.Open(everyObj)
For index = 1 To Sheets.Count
'set active sheet trhough iteration and copy
bookList.Worksheets(index).Activate
Range("A2:IV" & Range("A65536").End(xlUp).Row).Copy
'move to target workbook, related sheet and paste
ThisWorkbook.Worksheets(index).Activate
Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
Application.CutCopyMode = False
'Next sheet
Next index
bookList.Close
Next
End Sub
can someone work the above script into excel and post it here..please?
I've tried it and it seems not working...
Bookmarks