Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 141
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 457
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 141
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i rename a sheet if the rename tab is inactive? Nelson Excel Worksheet Functions 1 March 3rd 10 10:28 AM
macro to: Add new sheet, then rename new sheet with todays date Paul Excel Worksheet Functions 3 September 29th 07 03:17 AM
Move data to new sheet - rename sheet based on criteria ? [email protected] Excel Discussion (Misc queries) 7 May 16th 07 10:22 PM
VBA rename sheet. paulrm906 Excel Discussion (Misc queries) 3 March 12th 06 12:18 PM
how do I rename a sheet jonwyn New Users to Excel 2 March 1st 05 08:36 PM


All times are GMT +1. The time now is 11:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"