Hello,
I have a macro that creates a new sheet from a template and renames these tabs based on a list. The template is called "Template" and the list is in column A of a tab named "List". See code below.
Sub Copy_Sheets()
Dim i As Integer
Dim wks As Worksheet
Dim Last_Row As Long
Set wks = Sheets("List")
Last_Row = wks.Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To Last_Row
Sheets("Template").Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = wks.Cells(i, 1)
Next
Calculate
End Sub
I would like to add some additional code, where I copy and paste data from a list into the new sheet.
I have additional data in each row of the "List" sheet in column B, C, and D that corresponds to the sheet name in column A (same row). For example, cells B10, C10, and D10 correspond to it's tab name in A10. I would like to paste this data into specific cells C3, C4, C5, for each sheet.
Thanks for the help!
I have a macro that creates a new sheet from a template and renames these tabs based on a list. The template is called "Template" and the list is in column A of a tab named "List". See code below.
Sub Copy_Sheets()
Dim i As Integer
Dim wks As Worksheet
Dim Last_Row As Long
Set wks = Sheets("List")
Last_Row = wks.Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To Last_Row
Sheets("Template").Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = wks.Cells(i, 1)
Next
Calculate
End Sub
I would like to add some additional code, where I copy and paste data from a list into the new sheet.
I have additional data in each row of the "List" sheet in column B, C, and D that corresponds to the sheet name in column A (same row). For example, cells B10, C10, and D10 correspond to it's tab name in A10. I would like to paste this data into specific cells C3, C4, C5, for each sheet.
Thanks for the help!