Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
How can I create a macro wherein the actions include adding a new worksheet
and naming the worksheet based on a field in the worksheet? Ex: 1. Add a worksheet 2. Name the worksheet referencing a field already defined. 3. #1 and #2 is automatic ( ran thru macro) Please help. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Perhaps
Sub addasheet() Worksheets.Add ActiveSheet.Name = Worksheets("Sheet1").Range("A1").Value End Sub Mike "eva" wrote: How can I create a macro wherein the actions include adding a new worksheet and naming the worksheet based on a field in the worksheet? Ex: 1. Add a worksheet 2. Name the worksheet referencing a field already defined. 3. #1 and #2 is automatic ( ran thru macro) Please help. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
eva
Sub Add_Sheets22() Dim rCell As Range For Each rCell In ActiveSheet.Range("A1") 'to add more than one sheet change range to ("A1:A10") or similar. With Worksheets.Add(After:=Worksheets(Worksheets.Count) ) .Name = rCell.Value End With Next rCell End Sub Gord Dibben MS Excel MVP On Mon, 3 Dec 2007 23:56:02 -0800, eva wrote: How can I create a macro wherein the actions include adding a new worksheet and naming the worksheet based on a field in the worksheet? Ex: 1. Add a worksheet 2. Name the worksheet referencing a field already defined. 3. #1 and #2 is automatic ( ran thru macro) Please help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro that runs when worksheet is automatically updated | Excel Worksheet Functions | |||
Macro add worksheet to workbook automatically | Excel Discussion (Misc queries) | |||
Run macro automatically on opening of worksheet | Excel Worksheet Functions | |||
Automatically pasting worksheet data to new worksheet with formulas | Excel Worksheet Functions | |||
Macro to automatically run | Excel Discussion (Misc queries) |