I need to create a given number of sheets, depending on the amount of names in a List. The sheets need to have the same name as the string value in every cell inside the list/array. So far my code, which is not working:
Private Sub loopfilter()
Dim VersandRange As Range
Dim rng As Range
Dim Name As String
Set VersandRange = Range("J2", Cells(Rows.Count, "j").End(xlUp))
For Each rng In VersandRange
rng.Value = Name
Worksheets.Add
ActiveSheet.Name = Name
Next
end sub
Thanks!
Worksheets.Add.Name = rng.Value