can i update an excel file from many other excel file in a folder.
(all the excel file have the same format)
each of these seperate files are basically production batch tickets.
this will help me automatically reduce stock after production as well it would also help to organize all the imp info from batch tickets in a single excel.
You can either create formulas to link in data from each workbook in the directory or create a VBA macro that loops through the files in the directory and extracts data into a master workbook.
To create the macro you need to use some VBA code such as the following. VBA Code:
Sub ImportFiles() Dim sh as Worksheet, sPath as String, sName as String Dim r as Range, fName as String set sh = Activesheet sPath = "C:\Myfolder\MyTextfiles\" sName = Dir(sPath & "*.txt") ' or ".CSV" - whatever is appropriate do while sname <> "" set fname = sPath & sname set r = sh.Cells(rows.count,1).end(xlup) ' now the recorded code with r used to specify the import location ' and fname used to specify the file name sName = dir() Loop End sub
Please help me in updating the excel sheet because i am really facing some problem with the current sheet and wasting my valuable time on unnecessary things