LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Adding and naming new worksheets

I have a worksheet that has 200-300 rows each falling into one of 8-10
categories. I am trying to find a way to create new worksheets for each of
the 8-10 categories, and then name them from the column that these catefories
are located.

Rowan from another post suggested:

One way would be to use a macro. If you have a unique list of categories in
column A then something like this should work:

Sub lime()
Dim i As Long
Dim ws As Worksheet
Dim tSht As Worksheet
On Error Resume Next
Set tSht = ActiveSheet
For i = 1 To tSht.Cells(Rows.Count, 1).End(xlUp).Row
Set ws = Sheets.Add
ws.Name = tSht.Cells(i, 1).Value
Set ws = Nothing
Next i
On Error GoTo 0
End Sub

I thing this will work, I just need a way to tell this macro to only pick
one of each of the categories in the column and name a new worksheet.

Any ideas?

Thanks,
Byron
 
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
Making for adding and naming a new sheet michaelberrier Excel Discussion (Misc queries) 13 May 29th 06 07:58 PM
Adding and Naming Multiple Worksheets Byron Excel Worksheet Functions 6 September 8th 05 02:52 AM
Naming Worksheets Chaz Excel Programming 1 July 25th 05 03:29 PM
Naming and Adding Worksheets Brenda Excel Programming 2 February 3rd 05 10:37 PM
Quick question about dynamically adding and naming worksheets Robbyn Excel Programming 2 August 2nd 04 01:25 AM


All times are GMT +1. The time now is 04:25 PM.

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"