Hi I need help in developing a macro for excel 2007. There are few excel files in a directory, the macro should consolidate all the data in these files into one single file in the same directory.
Please assist.
Thanks
X-TechKid
Quick and dirty: Sub something() Dim f As Object, fso As Object Set fso = CreateObject("Scripting.filesystemobject") With fso.opentextfile("list.txt", 2, True) For Each f In fso.Getfolder(".").Files If fso.GetExtensionName(f) = "xls" _ Or fso.GetExtensionName(f) = "xlsx" Then _ .WriteLine f Next f End With End Sub
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |