How to create multiple worksheets from a list of cell values?
Are there any quick or easy methods for us to create multiple worksheets based on a list of cell values in Excel? In this article, I will talk about some good tricks to solve this job.
Recommended Productivity Tools for Excel
Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial
Kutools for Excel: Save 71% of your time and solve 82% Excel problems for you. 300+ advanced tools designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial
To quickly create multiple new worksheets which named with a list of cell values, the following VBA code can help you.
1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following code in the Module Window.
VBA code: Create multiple worksheets from a list of cells:
Sub AddSheets() 'Updateby Extendoffice 20161215 Dim xRg As Excel.Range Dim wSh As Excel.Worksheet Dim wBk As Excel.Workbook Set wSh = ActiveSheet Set wBk = ActiveWorkbook Application.ScreenUpdating = False For Each xRg In wSh.Range("A1:A7") With wBk .Sheets.Add after:=.Sheets(.Sheets.Count) On Error Resume Next ActiveSheet.Name = xRg.Value If Err.Number = 1004 Then Debug.Print xRg.Value & " already used as a sheet name" End If On Error GoTo 0 End With Next xRg Application.ScreenUpdating = True End Sub
Note: In the above code, A1:A7 is the cell range that you want to create sheets based on, please change it to your need.
3. Then press F5 key to run this code, and the new sheets have been created after all sheets in current workbook, see screenshot:
If you are not skilled with the above code, here is a handy tool-Kutools for Excel, with its Create Sequence Worksheets function, the worksheets will be created based on the cell values in a new workbook.
|Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.|
After installing Kutools for Excel, please do as this:
1. Click Enterprise > Worksheet > Create Sequence Worksheets, see screenshot:
2. In the Create Sequence Worksheets dialog box:
(1.) Select one worksheet that you want to create sequence worksheets based on;
(2.) Then select Data in a range option from the Sheet names based on list box, and click button to select the cell values that you want to use.
3. And then click Ok button, the worksheets have been created with the names of the cell values in a new workbook, see screenshot:
Recommended Productivity Tools
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.· 3 months agoThis works great, how could you incorporate a template into each created tab? i.e. copy and paste from a template into each newly created sheet
To post as a guest, your comment is unpublished.· 1 years agoFirst time using VBA code in Excel. Worked perfectly on the first try. Thanks for posting this.
To post as a guest, your comment is unpublished.· 1 years agoand it creates a lot of sheets even if the list is empty... what if i want to create sheets based on cells that have value?
To post as a guest, your comment is unpublished.· 1 years agoBetter version. This will delete created sheet if exist another sheet with the same name. And added inputbox to avoid from manual code modification to select range.
Dim xRg As Range, wBk As Workbook
Set wBk = ActiveWorkbook
On Error GoTo Quit
Set dbRange = Application.InputBox("Range: ", "Select Range", _
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each xRg In dbRange
On Error Resume Next
ActiveSheet.Name = xRg.Value
If Err.Number = 1004 Then
Debug.Print Chr(34) & xRg.Value & Chr(34) & " already used as a sheet name"
On Error GoTo 0
Application.ScreenUpdating = True
Application.DisplayAlerts = True
To post as a guest, your comment is unpublished.· 3 months agoWhat if i wanted each newly created sheet to have a template pasted into it from a template sheet? The template would have formatting and formulas only
To post as a guest, your comment is unpublished.· 8 months agoThis appears to work great for what I am attempting to do with one exception... It is creating blank worksheets... I want to create a copy of an existing worksheet for each row in another worksheet. Is there anyway to do that?