Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Naming Sheets using a range in another worksheet

Is there any way I can put names in a range on one sheet and then
automatically rename sheets with the names listed in the range without
manually renaming each sheet
--
gazza
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 179
Default Naming Sheets using a range in another worksheet

use macro

eg:
u have 5 sheets in a workbook
sheet1 A1 to A5 values are
New Name1
New Name2
New Name3
New Name4
New Name5

according to that if you want change sheet name, use below mentioned code:

Sub change_sheet_Name()
Dim i As Integer
For i = 1 To 5 ' or you can use thisworkbook.sheets.count

ThisWorkbook.Sheets(i).Name = ThisWorkbook.Sheets(1).Range("A" & i).Value

Next i
End Sub


Note: cell values should be unique

PLS DO RATE

"gazza" wrote:

Is there any way I can put names in a range on one sheet and then
automatically rename sheets with the names listed in the range without
manually renaming each sheet
--
gazza

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Naming Sheets using a range in another worksheet

For Each sh in Activeworkbook.Worksheets
i = i + 1
sh.Name = Cells(i,"A").Value
Next sh

assumes the names are in A1:An on the active worksheet

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"gazza" wrote in message
...
Is there any way I can put names in a range on one sheet and then
automatically rename sheets with the names listed in the range without
manually renaming each sheet
--
gazza



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Naming Sheets using a range in another worksheet

'assumes sheet number and list are the same number. 5 sheets & 5 names
Sub nametabs()
For i = 2 To Cells(Rows.Count, "a").End(xlUp).Row
Sheets(i).Name = Cells(i, "a")
Next
End Sub

--
Don Guillett
SalesAid Software

"gazza" wrote in message
...
Is there any way I can put names in a range on one sheet and then
automatically rename sheets with the names listed in the range without
manually renaming each sheet
--
gazza



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
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
same range, multiple sheets, different sorts, help please! nikmasteed Excel Worksheet Functions 2 May 19th 06 04:30 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Worksheet Functions 6 March 29th 06 12:43 PM
Naming a range bob777 Excel Discussion (Misc queries) 1 February 1st 06 01:05 PM
macro help thephoenix12 Excel Discussion (Misc queries) 4 July 15th 05 05:57 PM


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