Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create a new Excel file with selected cells | Excel Discussion (Misc queries) | |||
inserting a named range into new cells based on a named cell | Excel Discussion (Misc queries) | |||
Named cells across Excel files | Excel Discussion (Misc queries) | |||
Remove empty cells from named list / validation list | Excel Worksheet Functions | |||
Is it possible to create a macro to group? | Excel Discussion (Misc queries) |