In this tutorial, let us learn how to rename multiple worksheets at once using VBA code in MS Excel.
The common way to rename a sheet in excel is by right clicking on any sheet tab and selecting the option called Rename.
But we have to do this manually one by one if we have got multiple sheets to rename.
So now, in this video, let us learn how to automatically rename multiple worksheets at once using the VBA code.
1. Right click on any sheet tab, and click on View code option or press Alt+F11 to go to VBA window.
2. Insert a module and copy, paste the code as mentioned below.
Sub ChangeWorkSheetName()
Dim Rng As Range
Dim WorkRng As Range On Error Resume Next newName = Application.InputBox(“Name”, xTitleId, “”, Type:=2)
For i = 1 To Application.Sheets.Count Application.Sheets(i).Name = newName & i Next End Sub 3. Close this window and go back to Excel window 4. From the view tab of Menu bar, Select Macro and click on Run. A pop-up window will open up and enter the name that you want to give. Here I am giving it as "dptutorials". 5. click ok. 6. You can that all the sheets getting renamed with the name that has been given. So friends, in this way one can Rename multiple worksheets at once using VBA code in Excel.
For Personalized detail learning, write to dptutorials15@gmail.com If you found this video valuable, give it a like. If you know someone who needs to see it, share it. Leave a comment below with your thoughts. Add it to a playlist if you want to watch it later.
***************************************************************
Read my full article on this: http://ift.tt/2kB14dh
***************************************************************
Subscribe for more Awesome Tutorials: goo.gl/4T8ePc
***************************************************************
Support The Channel via shopping: http://ift.tt/2jH38PR
**************************************************************
You Can Connect With Me at
G+ : http://ift.tt/2kAOpa6
Twitter : https://twitter.com/dptutorials15
Facebook : http://ift.tt/2kfRnDi
Blogspot : http://ift.tt/2kB14dh
The common way to rename a sheet in excel is by right clicking on any sheet tab and selecting the option called Rename.
But we have to do this manually one by one if we have got multiple sheets to rename.
So now, in this video, let us learn how to automatically rename multiple worksheets at once using the VBA code.
1. Right click on any sheet tab, and click on View code option or press Alt+F11 to go to VBA window.
2. Insert a module and copy, paste the code as mentioned below.
Sub ChangeWorkSheetName()
Dim Rng As Range
Dim WorkRng As Range On Error Resume Next newName = Application.InputBox(“Name”, xTitleId, “”, Type:=2)
For i = 1 To Application.Sheets.Count Application.Sheets(i).Name = newName & i Next End Sub 3. Close this window and go back to Excel window 4. From the view tab of Menu bar, Select Macro and click on Run. A pop-up window will open up and enter the name that you want to give. Here I am giving it as "dptutorials". 5. click ok. 6. You can that all the sheets getting renamed with the name that has been given. So friends, in this way one can Rename multiple worksheets at once using VBA code in Excel.
For Personalized detail learning, write to dptutorials15@gmail.com If you found this video valuable, give it a like. If you know someone who needs to see it, share it. Leave a comment below with your thoughts. Add it to a playlist if you want to watch it later.
***************************************************************
Read my full article on this: http://ift.tt/2kB14dh
***************************************************************
Subscribe for more Awesome Tutorials: goo.gl/4T8ePc
***************************************************************
Support The Channel via shopping: http://ift.tt/2jH38PR
**************************************************************
You Can Connect With Me at
G+ : http://ift.tt/2kAOpa6
Twitter : https://twitter.com/dptutorials15
Facebook : http://ift.tt/2kfRnDi
Blogspot : http://ift.tt/2kB14dh
Comments
Post a Comment