Hi guys
I am working on a workbook (excel 2010) with 2 sheets. First sheet (List) contains the list of names in column B and C. The second sheet (CIS & FMS data) is the template I want to copy.
The entries in the list will be up to 1000 entries.
My request is to create a macro that copies the sheet (CIS & FMS data) x number of entries in the list. I do not want to copy the sheet 'List'. I also DO NOT want to copy the macro in to the newly created sheets.
Helpful if I can save each newly created worksheets with the names from Column B and C. For example the naming of each sheet is the combined name from column B&C. So the first sheet will be named 'AH15/100 Name -A' and so on.
Below is the first few lines of the list
Column B Column C
AH15/100 Name - A
AH15/101 Name - B
AH15/102 Name - C
AH15/103 Name - D
I also would like to automatically save the sheets in to a destination folder.
Thanks guys
Below is the macro I made from copying and amending existing macros from other sources but not working at all
Sub CreateWBs()
Dim lRow, x As Integer
Dim wbName As String
Dim MyRange As Range
Dim Sheet As Range
Set MyRange = Sheet("List").Range("B5")
lRow = Range("B" & Rows.Count).End(xlUp).Row
x = 1
Do
x = x + 1
wbName = Range("B" & x).Value & "_" & Range("C" & x).Value
ThisWorkbook.ActiveSheet.Copy
ActiveWorkbook.SaveAs Filename:=" H:\Desktop\to upload TRIM\" & wbName & ".xls"
Loop Until x = lRow
ActiveWorkbook.Close
End Sub
Bookmarks