Try something like this. Put the code in a standard code module (e.g.; Module1) and not a worksheet's code module.
Sub WorksheetCopyPaste()
Dim c As Range
With Worksheets("Sheet1")
For Each c In .Range("A1", .Range("A" & Rows.Count).End(xlUp)) 'Loop from A1 to last used cell in column A
Worksheets("Input").Range("A4").Value = c.Value 'Column A
Worksheets("Input").Range("C2").Value = c.Offset(, 2).Value 'Column C
Worksheets("Input").Range("E5").Value = c.Offset(, 4).Value 'Column E
ThisWorkbook.SaveAs "C:\Macro" & c.Value & ".xlsm"
Next c
End With
End Sub
Bookmarks