This will list all Excel files in the folder whose path is specified in A1 of the active sheet. List will begin in B1.
Set fs = CreateObject("Scripting.FileSystemObject")
Set F = fs.GetFolder(Range("A1").Value)
iRow = 1
On Error Resume Next
For Each myfile In F.Files
If myfile.Name Like "*.xls?" Then
Cells(iRow, 2).Value = myfile.Name
iRow = iRow + 1
N = N + 1
MsgBox N & " files listed"
Hello Everyone, I am working on one big project and need your small help in the same. I want to move excel files to folder based on their file names. below is the example - I have a folder path in A1 - B1 have date : 20-07-2020 - C1 have date : 15-07-2020 in path i have four files: 1...
I have an excel, in A1 i have a folder path, which will have folder path in folder there are 4 excel files - sample full - sample partial - example partial - example full i want when i click on button , macro should go to A1 path and combine all files has prefix sample. combine means merge on...