A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Numbering worksheets



 
 
Thread Tools Display Modes
  #1  
Old October 3rd, 2003, 01:44 AM
Shelly
external usenet poster
 
Posts: n/a
Default Numbering worksheets

I am using multiple worksheets within a workbook. In
cell A1 of each sheet is the number representing the
position of the worksheet (i.e. the first worksheet
has '1.' in cell A1, the second worksheet has '2.' in
cell A1). Is there a way for Excel to automatically fill
in this number?

I have used [='sheet1'A1+1] however if I add a sheet
between two existing sheets then the formula is broken
(i.e. adding a new worksheet between the existing 15th
and 16th worksheets, the 16th sheet becomes the 17th but
cell A1 will still point to the 15th sheet.)
  #2  
Old October 3rd, 2003, 02:45 AM
GB
external usenet poster
 
Posts: n/a
Default Numbering worksheets

Does this help?

Private Sub Workbook_NewSheet(ByVal Sh As Object)
For i = 1 To Sheets.Count
Sheets(i).Range("A1") = i
Next
End Sub


Geoff



"Shelly" wrote in message
...
I am using multiple worksheets within a workbook. In
cell A1 of each sheet is the number representing the
position of the worksheet (i.e. the first worksheet
has '1.' in cell A1, the second worksheet has '2.' in
cell A1). Is there a way for Excel to automatically fill
in this number?

I have used [='sheet1'A1+1] however if I add a sheet
between two existing sheets then the formula is broken
(i.e. adding a new worksheet between the existing 15th
and 16th worksheets, the 16th sheet becomes the 17th but
cell A1 will still point to the 15th sheet.)



  #3  
Old October 3rd, 2003, 02:51 AM
GB
external usenet poster
 
Posts: n/a
Default Numbering worksheets

Does this help?

Private Sub Workbook_NewSheet(ByVal Sh As Object)
For i = 1 To Sheets.Count
Sheets(i).Range("A1") = i
Next
End Sub


Geoff


"Shelly" wrote in message
...
I am using multiple worksheets within a workbook. In
cell A1 of each sheet is the number representing the
position of the worksheet (i.e. the first worksheet
has '1.' in cell A1, the second worksheet has '2.' in
cell A1). Is there a way for Excel to automatically fill
in this number?

I have used [='sheet1'A1+1] however if I add a sheet
between two existing sheets then the formula is broken
(i.e. adding a new worksheet between the existing 15th
and 16th worksheets, the 16th sheet becomes the 17th but
cell A1 will still point to the 15th sheet.)



  #4  
Old October 4th, 2003, 10:20 AM
GB
external usenet poster
 
Posts: n/a
Default Numbering worksheets

Does this help?

Private Sub Workbook_NewSheet(ByVal Sh As Object)
For i = 1 To Sheets.Count
Sheets(i).Range("A1") = i
Next
End Sub

Geoff

NB: I already posted this reply on 3 October, but it did not appear in my
news-feed, so I am not sure what happened. Apologies to anyone who has
received this post more than once.


"Shelly" wrote in message
...
I am using multiple worksheets within a workbook. In
cell A1 of each sheet is the number representing the
position of the worksheet (i.e. the first worksheet
has '1.' in cell A1, the second worksheet has '2.' in
cell A1). Is there a way for Excel to automatically fill
in this number?

I have used [='sheet1'A1+1] however if I add a sheet
between two existing sheets then the formula is broken
(i.e. adding a new worksheet between the existing 15th
and 16th worksheets, the 16th sheet becomes the 17th but
cell A1 will still point to the 15th sheet.)



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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