Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jrh jrh is offline
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I create a dropdown list to select multiple items Oct1196 Excel Worksheet Functions 2 September 5th 07 08:19 PM
How do I create a CountIF statement for a range of items in a list CraigC Excel Worksheet Functions 1 March 7th 07 07:21 PM
How do I create a list of items in a column? stepaim Excel Worksheet Functions 3 May 6th 06 07:07 PM
how do i create a drop down list of items from a different file Profnutbutter Excel Worksheet Functions 3 March 31st 06 08:00 PM
Compare 2 columns, and create a list of items that are in both lists ruby2sdy Excel Worksheet Functions 3 October 8th 05 11:04 AM


All times are GMT +1. The time now is 11:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"