Creating Sheets in a present Xl File

A

anil

In the main Sheet i.e sheet1 i have a data of 10 names, and now i want
to create 10 sheets in the same xl file with the sheet name as the
above 10 names
 
A

ankur

Hi Anil try this,

Sub TEST()

Dim s As Worksheet
Set s = ActiveSheet

For i = 1 To s.Range("A65536").End(xlUp).Row

Sheets.Add
ActiveSheet.Name = s.Cells(i, 1)

Next i
s.Select

End Sub


Regards
Ankur
www.xlmacros.com
 
R

RichardSchollar

Hi

Quickest way would be to select the cells with the 10 names (asuming
there are no duplicates, and no existing sheet names with the same name
as one of the 10) and go Alt+F11 (opening up the VBE), Ctrl+G to get
the Immediate Window and paste the following line in:

For Each c in selection:set nw =worksheets.Add:nw.name = c.value:next

and press return.
 
Top