Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default NAME SHEETS sequentially

I have 100 sheets(Invoices).
I want to number these Invoices.
I want to name the first sheet #1000 and the rest to be renamed sequentially
after that.
How can I do this with as few keystrokes as possible?

Also, how can I then put that Invoice number in a cell on each sheet?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default NAME SHEETS sequentially

Enter 1000 in A1 of first sheet.

Right-click and drag down to A100. Release button and "Fill Series".

Run this macro.

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


Gord Dibben MS Excel MVP

On Wed, 4 Oct 2006 18:38:01 -0700, STEVE
wrote:

I have 100 sheets(Invoices).
I want to number these Invoices.
I want to name the first sheet #1000 and the rest to be renamed sequentially
after that.
How can I do this with as few keystrokes as possible?

Also, how can I then put that Invoice number in a cell on each sheet?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 152
Default NAME SHEETS sequentially

Gord
This guy owes you a CASE of the cold carbonated beverage of your choice.
Lou

"Gord Dibben" wrote:

Enter 1000 in A1 of first sheet.

Right-click and drag down to A100. Release button and "Fill Series".

Run this macro.

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


Gord Dibben MS Excel MVP

On Wed, 4 Oct 2006 18:38:01 -0700, STEVE
wrote:

I have 100 sheets(Invoices).
I want to number these Invoices.
I want to name the first sheet #1000 and the rest to be renamed sequentially
after that.
How can I do this with as few keystrokes as possible?

Also, how can I then put that Invoice number in a cell on each sheet?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default NAME SHEETS sequentially

Thanks again!

"Gord Dibben" wrote:

Enter 1000 in A1 of first sheet.

Right-click and drag down to A100. Release button and "Fill Series".

Run this macro.

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


Gord Dibben MS Excel MVP

On Wed, 4 Oct 2006 18:38:01 -0700, STEVE
wrote:

I have 100 sheets(Invoices).
I want to number these Invoices.
I want to name the first sheet #1000 and the rest to be renamed sequentially
after that.
How can I do this with as few keystrokes as possible?

Also, how can I then put that Invoice number in a cell on each sheet?



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

Steve

Thanks for the feedback.

I notice that I did not give a response to your question about getting the
sheetname into a cell on each sheet.

One quick way would be to rihgt-click on a sheet tab and "select all sheets".

In any cell enter this formula

=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

NOTE: the file must have been saved at least once in order to get the value.

If you want a macro this may get you what you want...............

Sub Date_Increment()
Dim myNum As Long
Dim iCtr As Long
myNum = 1000
For iCtr = 1 To Worksheets.Count
With Worksheets(iCtr).Range("A1")
.Value = myNum - 1 + iCtr
End With
Next iCtr
End Sub


Gord

On Thu, 5 Oct 2006 04:08:01 -0700, STEVE
wrote:

Thanks again!

"Gord Dibben" wrote:

Enter 1000 in A1 of first sheet.

Right-click and drag down to A100. Release button and "Fill Series".

Run this macro.

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


Gord Dibben MS Excel MVP

On Wed, 4 Oct 2006 18:38:01 -0700, STEVE
wrote:

I have 100 sheets(Invoices).
I want to number these Invoices.
I want to name the first sheet #1000 and the rest to be renamed sequentially
after that.
How can I do this with as few keystrokes as possible?

Also, how can I then put that Invoice number in a cell on each sheet?




Gord Dibben MS Excel MVP
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
delete sheets from a workbook without creating linked formulae BlueTig Excel Discussion (Misc queries) 3 August 23rd 06 08:39 AM
insert Rows with Formulas in Place on Multiple Sheets? Michael Link Excel Discussion (Misc queries) 5 March 9th 06 01:54 PM
Autofilter Lists across Multiple Sheets, Maintain Correct Referenc EDSTAFF Excel Worksheet Functions 0 November 14th 05 03:27 PM
In 3 active sheets in wkbk, determine& display the # of sheets that have data wrpalmer Excel Discussion (Misc queries) 1 November 4th 05 02:01 PM
calculating excel spreadsheet files for pensions and life insurance (including age calculation sheets) RICHARD Excel Worksheet Functions 1 March 15th 05 05:49 PM


All times are GMT +1. The time now is 04:58 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"