Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Find and Replace Sheet names
Any idea/code for changing the names of worksheets' names in a single go!
For instance, Converting sheet names like the following: Sheet(1) Sheet(2) Sheet(3) Sheet(4) Sheet(5) ... as follows: Sheet-1 Sheet-2 Sheet-3 Sheet-4 Sheet-5 ... Thanx in advance -- Best Regards, FARAZ A. QURESHI |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Find and Replace Sheet names
Use the macro
Sub rename_Sheets() i = 1 For Each ws In Worksheets ws.Name = "Sheet-" & i i = i + 1 Next End Sub "FARAZ QURESHI" wrote: Any idea/code for changing the names of worksheets' names in a single go! For instance, Converting sheet names like the following: Sheet(1) Sheet(2) Sheet(3) Sheet(4) Sheet(5) ... as follows: Sheet-1 Sheet-2 Sheet-3 Sheet-4 Sheet-5 ... Thanx in advance -- Best Regards, FARAZ A. QURESHI |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Find and Replace Sheet names
Hi,
Here is another alternative which assumes that the sheets may not all be number in order and that some of the sheets may not need to be renamed because they aren't numbered in the said manner: Sub Rename() Dim ws As Worksheet On Error Resume Next For Each ws In Worksheets ws.Name = Replace(Replace(ws.Name, "(", "-"), ")", "") Next ws End Sub -- If this helps, please click the Yes button Cheers, Shane Devenshire "FARAZ QURESHI" wrote: Any idea/code for changing the names of worksheets' names in a single go! For instance, Converting sheet names like the following: Sheet(1) Sheet(2) Sheet(3) Sheet(4) Sheet(5) ... as follows: Sheet-1 Sheet-2 Sheet-3 Sheet-4 Sheet-5 ... Thanx in advance -- Best Regards, FARAZ A. QURESHI |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to find and Replace hyperlink in hold sheet? | Excel Discussion (Misc queries) | |||
How do I replace A, B, C, Column names, with my own names? | Excel Discussion (Misc queries) | |||
How to find/replace all of the names of files in EXCEL workbook. | Excel Discussion (Misc queries) | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions | |||
Find and REPLACE within a selection, or column- not entire sheet/. | Excel Worksheet Functions |