A macro similar to this shall do the work for you:
Sub test()
Dim wbk As Workbook, wbknew As Workbook, last As Long, i As Long, j As Long, fname As String
Application.ScreenUpdating = False
Set wbk = ThisWorkbook
With wbk.Sheets("RC")
last = .Cells(5, .Columns.Count).End(xlToLeft).Column
End With
For j = 7 To last
wbk.Sheets(Array("Instructions", "Cover Page", "RC")).Copy
Set wbknew = ActiveWorkbook
With wbknew
fname = .Sheets("RC").Cells(5, j) & ".xlsx"
For i = last To 7 Step -1
If i <> j Then .Sheets("RC").Columns(i).Delete
Next i
.SaveAs fname 'saving in the default folder
.Close False
End With
Next j
End Sub
Provided company names are unique (in the sample file you have TWO Companies C) and are valid as filename - for instance do not have characters like ? * < > [ ] : |
Bookmarks