Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Autofill Worksheets / Worksheet Names

Is it possible to use an autofill type feature to add and name worksheets in
a series i.e. Jan, Feb, Mar, etc. or 1, 2, 3?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Autofill Worksheets / Worksheet Names

Not directly in XL, but you could do it with a short macro. Let's say your
list in in cells a1:a12 (must start in first row!). With the sheet containing
these values active, run this macro:

'===============
Sub NameSheets()
i = 1
For Each ws In ThisWorkbook.Sheets
ws.Name = ActiveSheet.Cells(i, "A").Value
i = i + 1
Next ws
End Sub
'==============

You can install a macro by opening the VBE (Alt+F11), Insert - Module, paste
the code in. From XL, go to Tools - Macro - Macros.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"hawaiiham2000" wrote:

Is it possible to use an autofill type feature to add and name worksheets in
a series i.e. Jan, Feb, Mar, etc. or 1, 2, 3?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Autofill Worksheets / Worksheet Names

You want to add more sheets and name them?

In Sheet1 enter the list of Jan to Dec in A1:A12

Run this macro from Sheet1

Sub Add_Sheets22()
Dim rCell As Range
For Each rCell In Range("A1:A12")
With Worksheets.Add(After:=Worksheets(Worksheets.Count) )
.Name = rCell.Value
End With
Next rCell
End Sub

You want to add 20 sheets named 1 to 20

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

Many other sheet naming macros.........days of month.......weeks of month
etc.


Gord Dibben MS Excel MVP

On Thu, 11 Feb 2010 08:07:01 -0800, hawaiiham2000
wrote:

Is it possible to use an autofill type feature to add and name worksheets in
a series i.e. Jan, Feb, Mar, etc. or 1, 2, 3?

Thanks!


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
want to autofill from 300+ names jerminski73 Excel Discussion (Misc queries) 3 July 29th 09 07:32 PM
Create a list in one worksheet of the other worksheets' names Kelli Excel Worksheet Functions 0 July 7th 05 08:45 PM
Autofill Worksheet names Bonnie Setting up and Configuration of Excel 1 March 3rd 05 08:24 PM
Autofill Worksheets Bonnie Excel Discussion (Misc queries) 1 March 3rd 05 03:45 PM
Autofill Sheet names? Anauna Excel Discussion (Misc queries) 2 February 16th 05 09:10 PM


All times are GMT +1. The time now is 12:39 AM.

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"