This code right here range copies from each excel file in the folder and paste in master file. I want it copy,transpose and paste it which this code fails to do so. Please help and thanks in advance.
Sub LoopThroughDirectory()
Dim MyFile As String
Dim erow
dum = "D:\MACROS Test folder\"
MyFile = Dir(dum)
Do While Len(MyFile) > 0
If MyFile = "Z_Macro .xlsm" Then
Exit Sub
End If
Workbooks.Open (dum + MyFile)
Range("F17:F24").Copy
ActiveWorkbook.Close
erow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Paste Destination:=Worksheets("sheet1").Range(Cells(erow, 1),
Cells(erow, 4))
MyFile = Dir
Loop
End Sub