#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 81
Default Sheet Numbers

Hi Everyone,

Is it possible to have a macro changing sheet numbers automaticaly. My
workbook contains over 300 sheets starting from number 1.

Thank you

Albert
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sheet Numbers

You just want them numbered 1 to 300?

Enter the numbers 1 to 300 in column A of first sheet.

Run this macro.

Sub NameWS()
'name sheets with list in A1:A300 on first sheet
On Error Resume Next
For i = 1 To Worksheets.Count
Sheets(i).Name = Sheets(1).Cells(i, 1).Value
Next i
End Sub


Gord Dibben MS Excel MVP

On Sat, 12 Jan 2008 22:11:00 -0800, albertmb
wrote:

Hi Everyone,

Is it possible to have a macro changing sheet numbers automaticaly. My
workbook contains over 300 sheets starting from number 1.

Thank you

Albert


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Sheet Numbers

Do you really need to put the numbers in Column A? This would work, right?

Sub NameWS()
Dim i As Long
On Error Resume Next
For i = 1 To Worksheets.Count
Sheets(i).Name = i
Next i
End Sub

Rick


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
You just want them numbered 1 to 300?

Enter the numbers 1 to 300 in column A of first sheet.

Run this macro.

Sub NameWS()
'name sheets with list in A1:A300 on first sheet
On Error Resume Next
For i = 1 To Worksheets.Count
Sheets(i).Name = Sheets(1).Cells(i, 1).Value
Next i
End Sub


Gord Dibben MS Excel MVP

On Sat, 12 Jan 2008 22:11:00 -0800, albertmb
wrote:

Hi Everyone,

Is it possible to have a macro changing sheet numbers automaticaly. My
workbook contains over 300 sheets starting from number 1.

Thank you

Albert



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 81
Default Sheet Numbers

Thank You all, you are marvelous people.
Rick, it worked perfectly.

"Rick Rothstein (MVP - VB)" wrote:

Do you really need to put the numbers in Column A? This would work, right?

Sub NameWS()
Dim i As Long
On Error Resume Next
For i = 1 To Worksheets.Count
Sheets(i).Name = i
Next i
End Sub

Rick


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
You just want them numbered 1 to 300?

Enter the numbers 1 to 300 in column A of first sheet.

Run this macro.

Sub NameWS()
'name sheets with list in A1:A300 on first sheet
On Error Resume Next
For i = 1 To Worksheets.Count
Sheets(i).Name = Sheets(1).Cells(i, 1).Value
Next i
End Sub


Gord Dibben MS Excel MVP

On Sat, 12 Jan 2008 22:11:00 -0800, albertmb
wrote:

Hi Everyone,

Is it possible to have a macro changing sheet numbers automaticaly. My
workbook contains over 300 sheets starting from number 1.

Thank you

Albert




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sheet Numbers

True, you don't need the numbers in Column A.

Your code works fine.

I posted standard code that will use whatever is in column A, be it numbers or a
list of unique names of all my grand-children.

But I wouldn't need A1:A300<g.


Gord

On Sun, 13 Jan 2008 01:51:18 -0500, "Rick Rothstein \(MVP - VB\)"
wrote:

Do you really need to put the numbers in Column A? This would work, right?

Sub NameWS()
Dim i As Long
On Error Resume Next
For i = 1 To Worksheets.Count
Sheets(i).Name = i
Next i
End Sub

Rick


"Gord Dibben" <gorddibbATshawDOTca wrote in message
.. .
You just want them numbered 1 to 300?

Enter the numbers 1 to 300 in column A of first sheet.

Run this macro.

Sub NameWS()
'name sheets with list in A1:A300 on first sheet
On Error Resume Next
For i = 1 To Worksheets.Count
Sheets(i).Name = Sheets(1).Cells(i, 1).Value
Next i
End Sub


Gord Dibben MS Excel MVP

On Sat, 12 Jan 2008 22:11:00 -0800, albertmb
wrote:

Hi Everyone,

Is it possible to have a macro changing sheet numbers automaticaly. My
workbook contains over 300 sheets starting from number 1.

Thank you

Albert





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Sheet Numbers

I posted standard code that will use whatever is in column A, be it
numbers
or a list of unique names of all my grand-children.

But I wouldn't need A1:A300<g.


LOL

Rick

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 81
Default Sheet Numbers

Rick I kept a copy of your macro to, but I still did not have the time to try
it out, I will let you know.
Thank you ever so much
Albert

"Rick Rothstein (MVP - VB)" wrote:

I posted standard code that will use whatever is in column A, be it
numbers
or a list of unique names of all my grand-children.

But I wouldn't need A1:A300<g.


LOL

Rick


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Sheet Numbers

I'm confused. In this message (the one I'm responding to) you are saying you
didn't try my macro out, but earlier today (about 7.5 hours ago) you said
this..

"Thank You all, you are marvelous people.
Rick, it worked perfectly."

If you didn't try my macro out, what was it that "worked perfectly" earlier
in the day?

Rick


"albertmb" wrote in message
...
Rick I kept a copy of your macro to, but I still did not have the time to
try
it out, I will let you know.
Thank you ever so much
Albert

"Rick Rothstein (MVP - VB)" wrote:

I posted standard code that will use whatever is in column A, be it
numbers
or a list of unique names of all my grand-children.

But I wouldn't need A1:A300<g.


LOL

Rick



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 81
Default Sheet Numbers

I apologise Rick, it was my mistake, I did use your macro, that message was
ment for Gordon. But I still think you are all marvelous people, before I
got to know about this discussion Group I thought I knew how to work with
Excel but all of you amaze me, you have an answer to everything. Well-done
and thank you all for the time you dedicate to people like me.

Regards

Albert

"Rick Rothstein (MVP - VB)" wrote:

I'm confused. In this message (the one I'm responding to) you are saying you
didn't try my macro out, but earlier today (about 7.5 hours ago) you said
this..

"Thank You all, you are marvelous people.
Rick, it worked perfectly."

If you didn't try my macro out, what was it that "worked perfectly" earlier
in the day?

Rick


"albertmb" wrote in message
...
Rick I kept a copy of your macro to, but I still did not have the time to
try
it out, I will let you know.
Thank you ever so much
Albert

"Rick Rothstein (MVP - VB)" wrote:

I posted standard code that will use whatever is in column A, be it
numbers
or a list of unique names of all my grand-children.

But I wouldn't need A1:A300<g.

LOL

Rick




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Sheet Numbers

No apology necessary... I just found the contradiction confusing, that is
all.

I've only been volunteering in the Excel newsgroups for about 9 months, and
my overall knowledge of Excel is still limited, so I don't think I belong in
the group you are singling out at this point in time (one day, I hope, but
not yet). However, I do concur with you and would like to join you in
applauding the efforts of the long-time regulars here... they ARE truly a
marvelous group of people.

Rick


"albertmb" wrote in message
...
I apologise Rick, it was my mistake, I did use your macro, that message was
ment for Gordon. But I still think you are all marvelous people, before I
got to know about this discussion Group I thought I knew how to work with
Excel but all of you amaze me, you have an answer to everything.
Well-done
and thank you all for the time you dedicate to people like me.

Regards

Albert

"Rick Rothstein (MVP - VB)" wrote:

I'm confused. In this message (the one I'm responding to) you are saying
you
didn't try my macro out, but earlier today (about 7.5 hours ago) you said
this..

"Thank You all, you are marvelous people.
Rick, it worked perfectly."

If you didn't try my macro out, what was it that "worked perfectly"
earlier
in the day?

Rick


"albertmb" wrote in message
...
Rick I kept a copy of your macro to, but I still did not have the time
to
try
it out, I will let you know.
Thank you ever so much
Albert

"Rick Rothstein (MVP - VB)" wrote:

I posted standard code that will use whatever is in column A, be it
numbers
or a list of unique names of all my grand-children.

But I wouldn't need A1:A300<g.

LOL

Rick





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
Unable to add numbers from another sheet UT Excel Discussion (Misc queries) 5 December 19th 07 10:23 PM
Filling Sheet numbers in a column mikresources Excel Worksheet Functions 4 September 24th 07 04:10 AM
In spread sheet the numbers entered as whole numbers become decim George A. Yorks Excel Worksheet Functions 3 January 28th 07 06:41 PM
Numbers I enter on one sheet transfer onto others sometimes. Why? Chazzer555 Excel Discussion (Misc queries) 1 October 20th 06 07:48 AM
Disappearance of Sheet Numbers Wquinn New Users to Excel 1 December 12th 05 02:12 AM


All times are GMT +1. The time now is 09:27 AM.

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

About Us

"It's about Microsoft Excel"