rename specific worksheets

reza_doang

Board Regular
Joined
May 31, 2010
Messages
187
Hi -

everyday i always have 3 sheet (sheet1, sheet2 and sheet3) and need to copy to new workbook.
but before that, i need to rename it with
- sheet1 = backlog approval
- sheet2 = backlog release
- sheet3 = backlog pr

instead using manual effort, can you please help to create vba macro to run automatic.

thanks in advance
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
See if this helps for the renaming.
Code:
Sub Rename_Sheets()
  On Error Resume Next
  Sheets("sheet1").Name = "backlog approval"
  Sheets("sheet2").Name = "backlog release"
  Sheets("sheet3").Name = "backlog pr"
  On Error GoTo 0
End Sub
 
Upvote 0
See if this helps for the renaming.
Code:
Sub Rename_Sheets()
  On Error Resume Next
  Sheets("sheet1").Name = "backlog approval"
  Sheets("sheet2").Name = "backlog release"
  Sheets("sheet3").Name = "backlog pr"
  On Error GoTo 0
End Sub

thanks Peter for quick response, and working like a charm :)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top