Auto Generate and name Worksheets from a list

E-Coli - Sep 2, 2008 at 02:33 PM
 Gagan - Apr 3, 2017 at 10:47 AM

How can I automatically create and name worksheets in a workbook based on a list that exists in another sheet "Summary" in the workbook? The list begins at cell A10. Mind you, this list will vary from workbook to workbook. Do you have some code already compiled to perform this?


2 responses

Ivan-hoe Posts 433 Registration date Saturday February 16, 2008 Status Member Last seen October 17, 2008 110
Sep 6, 2008 at 01:26 AM
Hello E-Coli,
apparently my tips did not help you.
anyway, here is a solution :
Sub CreateSheetsFromAList()
    Dim MyCell As Range, MyRange As Range
    Set MyRange = Sheets("Summary").Range("A10")
    Set MyRange = Range(MyRange, MyRange.End(xlDown))

    For Each MyCell In MyRange
        Sheets.Add After:=Sheets(Sheets.Count) 'creates a new worksheet
        Sheets(Sheets.Count).Name = MyCell.Value ' renames the new worksheet
    Next MyCell
End Sub

please let me know where exactly script shouldbe done becus I am not familiar with macros but I would like to create sheet name for about a year datewise from the month of NOV 2009 in a single work book or atleast for a period of 3 months

pls reply immdtly

This was beautiful - Than you E-Coli and Ivan-hoe!