Hi
I run both the macro but there is a small problem. If there is a sheet already exists, either is stops running further or it simply creats sheets named sheet11, sheet12 sheet13 etc for all repeating names. This is troublesome. If the sheet already exists,
Macro should go to the next cell and continue creating the balance sheets. Can it be done? Sorry for my poor english
Thanks
Joh
----- Tom Ogilvy wrote: ----
Dim Rng As Rang
Dim sh as Workshee
For Each Rng In Worksheets("Sheet1").Range("A1:A10"
If Rng.Text <> "" The
On error resume nex
set sh = Worksheets(rng.text
On error goto
if sh is nothing the
With Worksheet
.Add(after:=.Item(.Count)).Name = Rng.Tex
End Wit
End i
End I
Next Rn
o
Dim Rng As Rang
For Each Rng In Worksheets("Sheet1").Range("A1:A10"
If Rng.Text <> "" The
On Error Resume Nex
With Worksheet
.Add(after:=.Item(.Count)).Name = Rng.Tex
End Wit
On Error goto
End I
Next Rn
-
Regards
Tom Ogilv
John said:
Perfectly fine. But now another problem popup. If I already have the shee
with that name macro gives error. How to skip creating sheet if it alread
exists