Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatically naming sheets


I have a list of names in Sheet1.range("a1:z1"). I want each sheet to
be named after a different name in the list. For example, I want
sheet2.name to be sheet1.range("a1"). Is there any quick way to
automate this.
Thanks,


--
ForSale
------------------------------------------------------------------------
ForSale's Profile: http://www.excelforum.com/member.php...o&userid=11896
View this thread: http://www.excelforum.com/showthread...hreadid=478338

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatically naming sheets


ForSale Wrote:
I have a list of names in Sheet1.range("a1:z1"). I want each sheet to
be named after a different name in the list. For example, I want
sheet2.name to be sheet1.range("a1"). Is there any quick way to
automate this.
Thanks,


Hi Forsale

You can use this macro

Sub update_all_names()
For Each sh In ActiveWorkbook.Sheets
sh.Activate
sh.Name = Cells(1, 1).Value
Next sh
End Sub


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=478338

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Automatically naming sheets

One way:

Dim i As Long
On Error Resume Next ' in case invalid or duplicate name
For i = 2 To Worksheets.Count
Worksheets(i).Name = Sheet1.Cells(1, i - 1).Text
Next i
On Error GoTo 0



In article ,
ForSale wrote:

I have a list of names in Sheet1.range("a1:z1"). I want each sheet to
be named after a different name in the list. For example, I want
sheet2.name to be sheet1.range("a1"). Is there any quick way to
automate this.

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
Automatically naming and linking controls Blue Max Excel Worksheet Functions 6 December 16th 08 06:04 AM
Automatically naming sheets Adam Excel Programming 11 April 5th 05 08:41 PM
naming a sheet automatically terry freedman Excel Programming 8 January 25th 05 04:39 PM
Automatically naming a tab jga Excel Discussion (Misc queries) 1 December 21st 04 03:30 PM
Automatically naming a worksheet tab with dates? Dick Kusleika[_2_] Excel Programming 1 September 6th 03 02:57 AM


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