Creating and Naming Tabs

ScottStanton

New Member
Joined
May 8, 2002
Messages
1
I create new budget models each year at my company. I create a tab for each account number(hundreds), and it takes tons of time to rename each tab as an account number. Is there a way to create tabs in a workbook from a list, so that I don't have to change the tab name manually for each one?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Man, those workbooks must be BIG !

About your question, yes, you can do a macro.

Select your list of names(numbers) and rename it to something, i'll assume SHEETNAMES

Then, copy and paste this macro in a module of your workbook (Or your personal.xls workbook). Then, run it !

Code:
Sub CreateSheets()
Dim ShtNames As Variant
Dim i As Long

ShtNames = Range("SHEETNAMES").Value
Application.ScreenUpdating = False
For i = LBound(ShtNames) To UBound(ShtNames)
    Sheets.Add(After:=Sheets(Sheets.Count)).Name = ShtNames(i, 1)
Next i
Application.ScreenUpdating = True
End Sub


_________________
Regards,

Juan Pablo G.
MrExcel.com Consulting
This message was edited by Juan Pablo G. on 2002-05-09 15:14
 
Upvote 0
Try this! Hope it helps. JSW

Public myTable
Sub tableSheets()
'The "Public myTable" varriable must be the first code in your module.
'myTable is the row of your tab name in your name table.

'This code must be run from a module.
'With macro options add a hot key to run this macro.

'Sheet1, Row "1" and Column "D" is the starting address of your
'table of sheet names, you must start in Row "1" you
'can change the sheet or column in the code below!

'Every time you hit your hot key, the code will add a new
'sheet with the next name from your table (like: Ctrl + a).

myTable = myTable + 1
Sheets.Add.Name = Worksheets("Sheet1").Range("D" & myTable)

End Sub
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top