ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Automate Insert Worksheet & Name (https://www.excelbanter.com/excel-discussion-misc-queries/185157-automate-insert-worksheet-name.html)

Benjamin

Automate Insert Worksheet & Name
 
I have a list of Tab Names. Is there any way to automate the process of
inserting a new worksheet and naming it from the list?

List
A
B
C
D
Etc.

To make Worksheets A, B, C, and D?

thanks

BNT1 via OfficeKB.com

Automate Insert Worksheet & Name
 
Hi

Had this reply which worked for me

http://www.officekb.com/Uwe/Forum.as...heet-from-list


regards

Benjamin wrote:
I have a list of Tab Names. Is there any way to automate the process of
inserting a new worksheet and naming it from the list?

List
A
B
C
D
Etc.

To make Worksheets A, B, C, and D?

thanks


--
Message posted via http://www.officekb.com


Gord Dibben

Automate Insert Worksheet & Name
 
Sub Add_Sheets22()
Dim rCell As Range
For Each rCell In Range("A1:A10")
With Worksheets.Add(After:=Worksheets(Worksheets.Count) )
.Name = rCell.Value
End With
Next rCell
End Sub

Assumes you are running the macro from the activesheet holding the proposed
names in A1:A10


Gord Dibben MS Excel MVP


On Fri, 25 Apr 2008 10:25:00 -0700, Benjamin
wrote:

I have a list of Tab Names. Is there any way to automate the process of
inserting a new worksheet and naming it from the list?

List
A
B
C
D
Etc.

To make Worksheets A, B, C, and D?

thanks



Gord Dibben

Automate Insert Worksheet & Name
 
I interpreted the request to add("inserting") sheets, not rename existing ones.


Gord

On Fri, 25 Apr 2008 18:46:32 GMT, "BNT1 via OfficeKB.com" <u19326@uwe wrote:

Hi

Had this reply which worked for me

http://www.officekb.com/Uwe/Forum.as...heet-from-list


regards

Benjamin wrote:
I have a list of Tab Names. Is there any way to automate the process of
inserting a new worksheet and naming it from the list?

List
A
B
C
D
Etc.

To make Worksheets A, B, C, and D?

thanks




All times are GMT +1. The time now is 08:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com