View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
John[_62_] John[_62_] is offline
external usenet poster
 
Posts: 16
Default New sheet from the cell contents

Perfectly fine. But now another problem popup. If I already have the sheet with that name macro gives error. How to skip creating sheet if it already exists

----- Chip Pearson wrote: ----

John

Try something like the following. Change A1:A10 to the appropriate range


Dim Rng As Rang
For Each Rng In Worksheets("Sheet1").Range("A1:A10"
If Rng.Text < "" The
With Worksheet
.Add(after:=.Item(.Count)).Name = Rng.Tex
End Wit
End I
Next Rn


--
Cordially
Chip Pearso
Microsoft MVP - Exce
Pearson Software Consulting, LL
www.cpearson.com



"John" wrote in messag
..
Hi falks
Is it possible to create new sheets with the cell contents in VBA
For e. g

1 joh
2 to
3 roge
I want to create new sheets named john, tom and roger by running a VBA

Is it posible
Thanks

Joh