Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
identify items in a list and create sheets
hello.
I have a column with names of people, names can be repeated. I want to create a new sheet for each person that appears, their name as a sheet name. How do I write the code to have excel identify the different names and make a tab for each person that appears? thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
identify items in a list and create sheets
Would it be alright if you sorted the column by name? It
simplifies things. If not I think you would need to collect an array of names in strName and evaluate it in a nested for each loop. Dim objName As Object Dim rngNameList As Range Dim strName As String Dim shtNew As Worksheet ' Define your range of names. strName = "" For Each objName In rngNameList If objName.Value < strName Then strName = objName.Value Set shtNew = Worksheets.Add ' Might use After here. shtNew.Name = strName End If Next HTH -Brad -----Original Message----- hello. I have a column with names of people, names can be repeated. I want to create a new sheet for each person that appears, their name as a sheet name. How do I write the code to have excel identify the different names and make a tab for each person that appears? thank you. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I create a dropdown list to select multiple items | Excel Worksheet Functions | |||
How do I create a CountIF statement for a range of items in a list | Excel Worksheet Functions | |||
How do I create a list of items in a column? | Excel Worksheet Functions | |||
how do i create a drop down list of items from a different file | Excel Worksheet Functions | |||
Compare 2 columns, and create a list of items that are in both lists | Excel Worksheet Functions |