How to Create Sequence Worksheets from a Range of Cells in Excel


Numerous spreadsheet jobs frequently call for data sequencing, and Excel offers strong capabilities to make this process quick and easy. Excel's sequencing features can help you save a lot of time and work whether you need to produce a succession of numbers, dates, or personalised patterns. You will have a thorough understanding of how to make sequence worksheets at the end of this course and be able to use this knowledge for a variety of Excel projects.

It is assumed that you are already familiar with Excel's user interface before we start. You'll still find this guide accessible and simple to follow even if you're a newbie. So let's begin and unleash the potential of Excel's sequencing features!

Create Sequence Worksheets from a Range of Cells

Here we will first create a VBA module and then select the range of cells to complete the task. So let us see a simple process to learn how you create sequence worksheets from a range of cells in Excel.

Step 1

Consider an Excel sheet where you have a list of sheet names similar to the below image.

First, right-click the sheet name and select View code to open the VBA application.

Right click > View code.

Step 2

Then click on Insert, select Module, and copy the below code into the text box.

Insert > Module > Copy.

Example

Sub CreateWorkSheetByRange()
Dim WorkRng As Range
Dim Ws As Worksheet
Dim arr As Variant
On Error Resume Next
xTitleId = "Create Sequence Worksheets"
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

Step 3

Then click F5 to run the module. Then select the range of cells and click OK to complete the task.

F5 > Select Cells > Ok.

This is how you can create sequence worksheets from a range of cells in Excel.

Conclusion

In this tutorial, we have used a simple example to demonstrate how you can create sequence worksheets from a range of cells in Excel to highlight a particular set of data.

Updated on: 12-Jul-2023

212 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements