Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Create Worksheets from List

  Asked By: Geeske    Date: Jan 19    Category: MS Office    Views: 1967
  

I want to create worksheets from the list in sheet1. plz help me.

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Shirley Allen     Answered On: Jan 19

This is a little short on details.

What's in the list?
Create sheets in the same workbook?
Does the sheet with the list  always have the same name?
Which column/row is the list in?
Have you tried already and what results/errors have you gotten?
Do you have any code to post?
Etc....

 
Answer #2    Answered By: Myrna Brown     Answered On: Jan 19

I have a list  of sheetnames in cells A1:A30 in sheet1. I need to create
sheets from list in same workbook.

 
Answer #3    Answered By: Reginald Thomas     Answered On: Jan 19

I'm a bit busy with other things but slapped this together for you. It
should do. Another option is to create  an array, and grab all the names
first instead of going back and forth to the main sheet, but like I said
I'm busy, and this should do the trick.

Dim i As Integer
Dim a As Integer
Dim sName As String
Dim sCurrentSheet As String

Range("A1").Select
sCurrentSheet = ActiveSheet.Name
i = Cells(Rows.Count, 1).End(xlUp).Row

For a = 1 To i
sName = ActiveCell.Offset(a - 1, 0).Value
Worksheets.Add
ActiveSheet.Name = sName
Sheets(sCurrentSheet).Select
Next

 
Answer #4    Answered By: Seth Anderson     Answered On: Jan 19

Try recording a macro in which you create  a new worksheet, and rename it to
another name.
Then use this macro as a template to loop through the cell names on sheet1.

 
Answer #5    Answered By: Jeanne Lawson     Answered On: Jan 19

Here's a short version:

Sub AddSheets()
Dim X, FirstSheet, CurSheet, newSheetName
FirstSheet = ActiveSheet.Name
For X = 1 To 30
If (Sheets(FirstSheet).Cells(X, 1) <> "") Then
Sheets.Add
Sheets(ActiveSheet.Name).Name = Sheets(FirstSheet).Cells(X, 1)
Sheets(Sheets(FirstSheet).Cells(X, 1).Value).Move
after:=Sheets(Sheets.Count)
End If
Next X
End Sub

 
Didn't find what you were looking for? Find more on Create Worksheets from List Or get search suggestion and latest updates.




Tagged: