Hi Ivo,
This will insert a new worksheet after worksheet 1 and name it:
Worksheets.Add(After:=Worksheets(1)).Name = "My New Worksheet"
Hi,
what about if you want to add multiple worksheets and the names are coming from a list/range?
Hi,
After the answer to that question, what question comes next?
Formulate the beginning what you want, do not ask question after question!
Sub CreateSheets()
Dim ws As Worksheet
Dim Ki As Range
Dim ListSh As Range
With Worksheets("List")
Set ListSh = .Range("A2:A" & .Cells(.Rows.Count, "A").End(xlUp).Row)
End With
On Error Resume Next
For Each Ki In ListSh
If Len(Trim(Ki.Value)) > 0 Then
If Len(Worksheets(Ki.Value).Name) = 0 Then
Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = Ki.Value
End If
End If
Next Ki
End Sub