Hello,
Below I have a macro that will go into a folder and pull the names of the excel files.
1) I now need a macro that will go into the "Defaults" tab of each of these files and copy row 70 (columns "A" through "BM") and paste it into a blank sheet.
There could be 100 files in this folder. Is there a way to do this?
Many thanks in advance!
Below I have a macro that will go into a folder and pull the names of the excel files.
1) I now need a macro that will go into the "Defaults" tab of each of these files and copy row 70 (columns "A" through "BM") and paste it into a blank sheet.
There could be 100 files in this folder. Is there a way to do this?
Many thanks in advance!
PHP:
Sub ListFiles()
Dim MyPathName As String
Dim MyFileName As String
Dim NumChars As Long
Dim X As Long
NumChars = 6 'Change this to the number of characters you wish to return
MyPathName = "C:\Program Files\excel files_folder\*.xl*" 'Change this to the folder and filetypes you want to return
MyFileName = Dir(MyPathName)
Do While MyFileName <> ""
X = X + 1
Sheet1.Cells(X, 1) = Left(MyFileName, NumChars)
MyFileName = Dir
Loop
End Sub