Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
BM BM is offline
external usenet poster
 
Posts: 10
Default Create tabs named after a group of cells?

Is it possible to create multiple tabs each being named after a particular
cell.

For example:

a1 Apple
a2 Pear
a3 Grape
a4 Banana

Could I somehow select that group of cells and have tabs automatically
generated named, Apple, Pear, Grape, and Banana?

I have a rather large list and would like to automate the process if possible.

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Create tabs named after a group of cells?

This macro will do what you wish.

Sub Add_Sheets()
Dim rCell As Range
For Each rCell In ActiveSheet.Range("A1:A10")
'alternative.......... For Each rCell In Selection
With Worksheets.Add(after:=Worksheets(Worksheets.Count) )
.Name = rCell.Value
End With
Next rCell
End Sub


Gord Dibben MS Excel MVP

On Tue, 26 Sep 2006 12:42:01 -0700, BM wrote:

Is it possible to create multiple tabs each being named after a particular
cell.

For example:

a1 Apple
a2 Pear
a3 Grape
a4 Banana

Could I somehow select that group of cells and have tabs automatically
generated named, Apple, Pear, Grape, and Banana?

I have a rather large list and would like to automate the process if possible.

Thanks in advance!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default Create tabs named after a group of cells?

BM, you can with a macro,

Sub Name_Sheets()
Dim Rng As Range
Dim ListRng As Range
Set ListRng = Range(Range("A1"), Range("A1").End(xlDown))
For Each Rng In ListRng
If Rng.Text < "" Then
With Worksheets
.Add(after:=.Item(.Count)).Name = Rng.Text
End With
End If
Next Rng

End Sub

And if you are new to macros you may also what to have a look here on
getting started with macros

http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"BM" wrote in message
...
Is it possible to create multiple tabs each being named after a particular
cell.

For example:

a1 Apple
a2 Pear
a3 Grape
a4 Banana

Could I somehow select that group of cells and have tabs automatically
generated named, Apple, Pear, Grape, and Banana?

I have a rather large list and would like to automate the process if
possible.

Thanks in advance!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Create tabs named after a group of cells?

Just make sure none of the names in the range repeat each other; i.e., they
have to be unique names. Otherwise this code returns an error.

Dave
--
Brevity is the soul of wit.


"Gord Dibben" wrote:

This macro will do what you wish.

Sub Add_Sheets()
Dim rCell As Range
For Each rCell In ActiveSheet.Range("A1:A10")
'alternative.......... For Each rCell In Selection
With Worksheets.Add(after:=Worksheets(Worksheets.Count) )
.Name = rCell.Value
End With
Next rCell
End Sub


Gord Dibben MS Excel MVP

On Tue, 26 Sep 2006 12:42:01 -0700, BM wrote:

Is it possible to create multiple tabs each being named after a particular
cell.

For example:

a1 Apple
a2 Pear
a3 Grape
a4 Banana

Could I somehow select that group of cells and have tabs automatically
generated named, Apple, Pear, Grape, and Banana?

I have a rather large list and would like to automate the process if possible.

Thanks in advance!



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
Create a new Excel file with selected cells john Excel Discussion (Misc queries) 2 July 18th 06 12:28 AM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
Named cells across Excel files Rich Excel Discussion (Misc queries) 1 May 3rd 06 08:47 PM
Remove empty cells from named list / validation list Sp00k Excel Worksheet Functions 4 April 28th 06 03:45 PM
Is it possible to create a macro to group? Mike Piazza Excel Discussion (Misc queries) 1 January 8th 05 12:23 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"