Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
rename default sheet numbers
Hi,
I have over 100 sheets in a workbook and through time they have been moved around therefore default sheet numbers are all mixed, the sheets have names and are in alphabetical order 1 to 110, is there a way to rename all the sheets from 1 to 110 in there order as default sheet1 and so on to sheet110. Thanks Mark |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
rename default sheet numbers
'Try this macro:
'============= Sub ReSequence() 'Destroy old names For Each ws In ThisWorkbook.Worksheets ws.Name = ws.Name & "xxxxxx" Next i = 1 'Give new names For Each ws In ThisWorkbook.Worksheets ws.Name = "Sheet" & i i = i + 1 Next End Sub '=========== If you're new to macros: Debra Dalgleish has some notes how to implement macros he http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) -- Best Regards, Luke M "terilad" wrote in message ... Hi, I have over 100 sheets in a workbook and through time they have been moved around therefore default sheet numbers are all mixed, the sheets have names and are in alphabetical order 1 to 110, is there a way to rename all the sheets from 1 to 110 in there order as default sheet1 and so on to sheet110. Thanks Mark |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
rename default sheet numbers
I would suggest sorting the sheets in ascending order:
http://support.microsoft.com/default.aspx/kb/812386?p=1 Micky "terilad" wrote: Hi, I have over 100 sheets in a workbook and through time they have been moved around therefore default sheet numbers are all mixed, the sheets have names and are in alphabetical order 1 to 110, is there a way to rename all the sheets from 1 to 110 in there order as default sheet1 and so on to sheet110. Thanks Mark |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
rename default sheet numbers
This not working for what I need it to do, it is renaming the sheet tabs but
not the actual sheet numbers by default in VBA, the sheet has a name but also has a number in brackets, this is what I need to reset. Any ideas Mark "Luke M" wrote: 'Try this macro: '============= Sub ReSequence() 'Destroy old names For Each ws In ThisWorkbook.Worksheets ws.Name = ws.Name & "xxxxxx" Next i = 1 'Give new names For Each ws In ThisWorkbook.Worksheets ws.Name = "Sheet" & i i = i + 1 Next End Sub '=========== If you're new to macros: Debra Dalgleish has some notes how to implement macros he http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) -- Best Regards, Luke M "terilad" wrote in message ... Hi, I have over 100 sheets in a workbook and through time they have been moved around therefore default sheet numbers are all mixed, the sheets have names and are in alphabetical order 1 to 110, is there a way to rename all the sheets from 1 to 110 in there order as default sheet1 and so on to sheet110. Thanks Mark . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i rename a sheet if the rename tab is inactive? | Excel Worksheet Functions | |||
macro to: Add new sheet, then rename new sheet with todays date | Excel Worksheet Functions | |||
Move data to new sheet - rename sheet based on criteria ? | Excel Discussion (Misc queries) | |||
VBA rename sheet. | Excel Discussion (Misc queries) | |||
how do I rename a sheet | New Users to Excel |