How to create sequence worksheets from a range of cells in Excel?
If you have a range of data in your worksheet, and now, you want to create a sequence of worksheets based on the cell data, see following screenshot. Of course, you can edit the worksheet name one by one manually, but if there are multiple worksheet names need to be edited, this way will be troublesome and time-consuming. Here, I will talk about some quick tricks to help you.
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
The following VBA code can help you add some worksheets which are named based on the cell contents after existing worksheets. Please do as this:
1. Hold down the ALT + F11 keys, then it opens the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following code in the Module Window.
VBA code: add sequence worksheets based on list of cells
Sub CreateWorkSheetByRange() 'Update 20130829 Dim WorkRng As Range Dim Ws As Worksheet Dim arr As Variant On Error Resume Next xTitleId = "KutoolsforExcel" Set WorkRng = Application.Selection Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8) arr = WorkRng.Value Application.ScreenUpdating = False For i = 1 To UBound(arr, 1) For j = 1 To UBound(arr, 2) Set Ws = Worksheets.Add(after:=Application.ActiveSheet) Ws.Name = arr(i, j) Next Next Application.ScreenUpdating = True End Sub
3. Then press F5 key to run this code, and then a prompt box will be popped out for you to select the range that you want to use. See screenshot:
4. And then click OK, the worksheets which are named by the cell values have been added after the existing worksheet. See screenshot:
1. The new worksheets will be inserted after the current worksheet.
2. If the selected range included blank cells, the worksheets are named based on default. See screenshots:
Here, I introduce a handy tool-Kutools for Excel, with its Create Sequence Worksheets, you can quickly create worksheets with month name, day name, custom list and so on.
After installing Kutools for Excel, please do as following steps:
1. Select the range that you want to create worksheets based on.
2. Click Enterprise > Worksheet Tools > Create Sequence Worksheets, see screenshot:
3. In the Create Sequence Worksheets dialog box, choose the worksheet type that you want to create the new sequence worksheets, and then check Data in a range option, see screenshot:
4. Then click OK to close the dialog box, and a new workbook which contains the worksheets are named by the selected range data has been created. See screenshot:
1. If you choose Sheet 1 or Sheet 2, the new worksheets are created will be as the same formatting as Sheet 1 or Sheet 2.
2. The new worksheets are created in a new workbook.
3. If the selected range included blank cells, the worksheets are named based on default. See screenshots:
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.· 2 years agoHow to add bydefault table with row name and column name on sheets after creating sheets using command button. Please help.
To post as a guest, your comment is unpublished.· 2 years agoHow can the code be modified to copy a worksheet labeled "Template" and rename it to the values in the list selected in the range? I tried modifying the "worksheets.Add" code to "Worksheets("Template").Copy but it just makes copies with the worksheets labeled "Template(1)", "Template(2)", etc.
Also, is there a way to put the tabs in numerical order as they are added?
To post as a guest, your comment is unpublished.· 2 years agoHi,
Would it be possible to set-up a template for the new sheets created, instead of blank worksheets.
To post as a guest, your comment is unpublished.· 3 years agoHi,
I want to create invoices using excel and need to know whether is there a way to auto generate the second continuation page when the items on the first page exceed the A4 page layout that I have predefined? Any help is appreciated.
To post as a guest, your comment is unpublished.· 3 years agoCould you modify the VBA code so that if the worksheet exists, it is skipped over? As it exists now, running the code a second time on the same range will create numbered worksheets.
To post as a guest, your comment is unpublished.· 3 years agoHello,
Can I exclude blanks and automatically copy data with is behind the name? This data is generated from a pivot and I want to have all the names in different tabs with the data behind it in the layout.
name1 data data data
blank data data data
To post as a guest, your comment is unpublished.
To post as a guest, your comment is unpublished.· 5 years agoVery useful. thank you