Jump to content
Sign in to follow this  
nigsy

Create Multiple Copy Tabs in XLSX

Recommended Posts

Neat little VB script to create multiple copies of a worksheet tab in Excel:

 

Sub Copier ()
Dim x As Integer
x = InputBox("Enter number of times to copy Sheet1")
For numtimes = 1 To x
ActiveWorkbook.Sheets("Sheet1").Copy _
After:=ActiveWorkbook.Sheets("Sheet1")
Next
End Sub

Open the Visual Basic editor (alt + F11) > Insert > Module.

Paste the above text in. Ammend where it says "Sheet 1" to whatever the tab name is you want to duplicate leaving the quote marks in. (Note you need to change the Active workbook line and After line)

Then F5 to execute.

 

Enjoy!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×