L = InputBox('input Start number of row') ' input Start number of row K = InputBox('input number of row ') ' input number of row M = Application.InputBox('input Sheet Name Of Files ') ' input Sheet Name T = Application.InputBox('input Directory Files ') ' input Directory Excel Files Sub ReadDataFromAllWorkbooksInFolder()ĭim FolderName As String, wbName As String, cValue, t As Variantĭim wbList() As String, wbCount As Integer, i, j, r, s, k, l, p As Integer i want to copy them on one sheet.įinally, after searching, I Write following codes:Ģ-Name Sheets (Name Sheet Should be the same in All excel Files)
The corresponding worksheets from each Excel file are named exactly the same as are the column headers. 1 worksheets per Excel file which name is 'sheet1'. I have a few 200 excel files which are all of the sameįormat (i.e.