Creating Sheets in a present Xl File
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 |
Creating Sheets in a present Xl File
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 anil wrote: 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 |
Creating Sheets in a present Xl File
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. anil wrote: 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 |
All times are GMT +1. The time now is 07:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com