A
andy
hi
I have a list of sheet name in a1:a10
and what I want to do is go through each cell in that range and chk if a
work sheet exists with that name
if it does not, create a sheet in that name and them move on to the next
cell in the list
this is what i have so far
can some one point me in the right direction
Dim scv As Range
Set scv = ActiveSheet.Range("a1:a10")
Dim rng As Range
For Each rng In scv
If rng.Value > 0 Then
Dim wks_Sht As Worksheet
For Each wks_Sht In Workbooks(ActiveWorkbook.Name).Worksheets
If wks_Sht.Name = rng.Value Then
Exit For
Else
If wks_Sht.Name <> rng.Value Then
Sheets.Add.Name = rng.Value
Exit For
End If
End If
Next wks_Sht
End If
Next rng
End Sub
I have a list of sheet name in a1:a10
and what I want to do is go through each cell in that range and chk if a
work sheet exists with that name
if it does not, create a sheet in that name and them move on to the next
cell in the list
this is what i have so far
can some one point me in the right direction
Dim scv As Range
Set scv = ActiveSheet.Range("a1:a10")
Dim rng As Range
For Each rng In scv
If rng.Value > 0 Then
Dim wks_Sht As Worksheet
For Each wks_Sht In Workbooks(ActiveWorkbook.Name).Worksheets
If wks_Sht.Name = rng.Value Then
Exit For
Else
If wks_Sht.Name <> rng.Value Then
Sheets.Add.Name = rng.Value
Exit For
End If
End If
Next wks_Sht
End If
Next rng
End Sub