#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default naming sheet tab

I am trying to name the sheet tabs to correspond with the days of the month.
ie 1-31. Each book will be a month. How can I do this with out having to
remae all tabs individually?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default naming sheet tab


Easy enough to do but WHY? Are you planning on more than 65000 rows? If not,
why not ONE page and filter for the day desired.

--
Don Guillett
SalesAid Software

"artist4christ" wrote in message
...
I am trying to name the sheet tabs to correspond with the days of the
month.
ie 1-31. Each book will be a month. How can I do this with out having to
remae all tabs individually?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 772
Default naming sheet tab

I think this is what you want, it will create 31 sheets, you can adjust as
needed

Sub main()
For j = 31 To 1 Step -1
i = 2
Sheets.Add
ActiveSheet.Move After:=Sheets(i)
ActiveSheet.Name = Cells(j, 1)
i = i + 1
Next
End Sub
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"artist4christ" wrote:

I am trying to name the sheet tabs to correspond with the days of the month.
ie 1-31. Each book will be a month. How can I do this with out having to
remae all tabs individually?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default naming sheet tab

and how/where exactly do i insert this? I am still very much a novice at the
finer points of excel

thanks

"John Bundy" wrote:

I think this is what you want, it will create 31 sheets, you can adjust as
needed

Sub main()
For j = 31 To 1 Step -1
i = 2
Sheets.Add
ActiveSheet.Move After:=Sheets(i)
ActiveSheet.Name = Cells(j, 1)
i = i + 1
Next
End Sub
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"artist4christ" wrote:

I am trying to name the sheet tabs to correspond with the days of the month.
ie 1-31. Each book will be a month. How can I do this with out having to
remae all tabs individually?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 772
Default naming sheet tab

on your first sheet starting in A1 and going down put 1-31, press Alt-F11, if
there is a window on the left of the screen that says Project VBA Project
then lists the sheets, double click sheet1, if its not there hit ctrl R then
do the same.
Then paste the code and push F5 and that should do it.
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"artist4christ" wrote:

and how/where exactly do i insert this? I am still very much a novice at the
finer points of excel

thanks

"John Bundy" wrote:

I think this is what you want, it will create 31 sheets, you can adjust as
needed

Sub main()
For j = 31 To 1 Step -1
i = 2
Sheets.Add
ActiveSheet.Move After:=Sheets(i)
ActiveSheet.Name = Cells(j, 1)
i = i + 1
Next
End Sub
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"artist4christ" wrote:

I am trying to name the sheet tabs to correspond with the days of the month.
ie 1-31. Each book will be a month. How can I do this with out having to
remae all tabs individually?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default naming sheet tab

John

Just a heads' up................

Sheet modules should be reserved for event code, not general macros.

They are best placed into a General(or Standard) module.

Also, this macro requires no list of numbers on any sheet.

Sub Add_Sheets()
For i = 31 To 1 Step -1
Worksheets.Add.Name = i
Next
End Sub


Gord Dibben MS Excel MVP


On Wed, 17 Jan 2007 13:07:00 -0800, John Bundy (remove)
wrote:

on your first sheet starting in A1 and going down put 1-31, press Alt-F11, if
there is a window on the left of the screen that says Project VBA Project
then lists the sheets, double click sheet1, if its not there hit ctrl R then
do the same.
Then paste the code and push F5 and that should do it.


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
Auto Rename Excel Sheets in Workbook Kulin Shah Excel Worksheet Functions 12 December 25th 06 03:27 PM
Cell References [email protected] Excel Discussion (Misc queries) 2 November 15th 06 11:37 PM
macro unouwanme Excel Discussion (Misc queries) 9 August 31st 06 09:38 PM
Sum up columns in different sheet with error check zeyneddine Excel Discussion (Misc queries) 13 July 10th 06 01:21 PM
Using a relative SHEET reference for source data in a chart James Charts and Charting in Excel 6 August 16th 05 05:07 PM


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