Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default creating sheets with names from cells

I have seen and used code from this list that creates a worksheet with a name
from a specific cell.

What i'm now looking for is a way to create a variable number of sheets to
match the input from users, e.g. one week there will be a list in column A
of 3 items (perhaps 517,518,519) the next week a list of 4 items (possibly
517,519,612,613) and i want a sheet created and named for each of these.

could anyone point me in the right direction?

tia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default creating sheets with names from cells

Hi Tia,
just select cells with names of new sheets and run this:

Sub newsheets()
on error resume next
Dim ns As Worksheet
For Each ncell In Selection
Set ns = Worksheets.Add(after:=Worksheets(Worksheets.Count) )
ns.Name = ncell.Value
Next ncell
End Sub

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
converting email address names in a range of cells to real names John Excel Worksheet Functions 1 May 19th 10 03:44 PM
Creating names BillCPA Excel Discussion (Misc queries) 0 June 1st 09 06:53 PM
Creating names for individual cells over a range AndrewEdmunds Excel Discussion (Misc queries) 1 August 29th 08 08:30 PM
cells and sheets, names PH NEWS Excel Worksheet Functions 3 February 20th 06 03:35 PM
Creating names Ann Shaw Excel Discussion (Misc queries) 14 March 4th 05 10:00 AM


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

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

About Us

"It's about Microsoft Excel"