Adding & Naming Worksheets according to a list
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Adding & Naming Worksheets according to a list

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Hi, I have a list of Customers on a "Data" worksheet. I want to make Excel add a new worksheet for each customer entry and name the worksheet to match the customer name, when that is done I want to copy the data and format of the "Main" worksheet to each consecutive worksheet

    Any help would be appreciated...

    Thanks
    Darren

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi Darrren

    Try this:


    Sub DoIt()
    Dim rCell As Range
    Dim strSheetName As String

    Application.ScreenUpdating = False
    Sheets("FormatSheet").UsedRange.Copy

    For Each rCell In Range("A1", Range("A65536").End(xlUp))
    strSheetName = rCell
    Sheets.Add().Name = strSheetName
    Sheets(strSheetName).Range("A1").PasteSpecial xlFormats
    Next rCell

    Application.CutCopyMode = False
    Application.ScreenUpdating = True
    End Sub


    Change then sheet name "FormatSheet" to suit and Range("A1", Range("A65536").End(xlUp)) to the range with your data. Also ensure there are no blank rows or ilegal sheet names between your data.



User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com