A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sheet Names



 
 
Thread Tools Display Modes
  #1  
Old August 14th, 2008, 05:23 PM posted to microsoft.public.excel.worksheet.functions
Accor
external usenet poster
 
Posts: 4
Default Sheet Names

Hi all

I have a spreadsheet with around 20 sheets; sheet1, sheet2, sheet3 etc.

Is there any shorter way to re-name them either from a list or let's say
call it. Month 1, Month 2, Month 3 without having to type one by one.

Thanks in advance
  #2  
Old August 14th, 2008, 05:50 PM posted to microsoft.public.excel.worksheet.functions
Gary''s Student
external usenet poster
 
Posts: 7,584
Default Sheet Names

Sub name_um()
i = 1
For Each ws In Worksheets
ws.Name = "month " & i
i = i + 1
Next
End Sub

--
Gary''s Student - gsnu200800
  #3  
Old August 14th, 2008, 05:50 PM posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_2_]
external usenet poster
 
Posts: 1,562
Default Sheet Names

For i = 1 To Worksheets.Count

Worksheets(i).name = Avctivesheet.Cells(i, "A").Value
Next i

--
__________________________________
HTH

Bob

"Accor" wrote in message
...
Hi all

I have a spreadsheet with around 20 sheets; sheet1, sheet2, sheet3 etc.

Is there any shorter way to re-name them either from a list or let's say
call it. Month 1, Month 2, Month 3 without having to type one by one.

Thanks in advance



  #4  
Old August 14th, 2008, 06:01 PM posted to microsoft.public.excel.worksheet.functions
ryguy7272
external usenet poster
 
Posts: 1,593
Default Sheet Names

Try this code he
http://www.ozgrid.com/forum/showthread.php?t=55611
Just put your names in A1 (or A3 in this example) and run the macro.

Regards,
Ryan---


--
RyGuy


"Accor" wrote:

Hi all

I have a spreadsheet with around 20 sheets; sheet1, sheet2, sheet3 etc.

Is there any shorter way to re-name them either from a list or let's say
call it. Month 1, Month 2, Month 3 without having to type one by one.

Thanks in advance

  #5  
Old August 14th, 2008, 06:13 PM posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Sheet Names

Your choice

Sub NameWS_List()
'name sheets with list of unique names in A1:A20 on first sheet
On Error Resume Next
For i = 1 To Worksheets.Count
Sheets(i).Name = Sheets(1).Cells(i, 1).Value
Next i
End Sub

Sub NameWS_Month()
'name sheets as Month 1, Month 2 etc.
On Error Resume Next
For i = 1 To Worksheets.Count
Sheets(i).Name = "Month " & i
Next i
End Sub


Gord Dibben MS Excel MVP

On Thu, 14 Aug 2008 09:23:00 -0700, Accor
wrote:

Hi all

I have a spreadsheet with around 20 sheets; sheet1, sheet2, sheet3 etc.

Is there any shorter way to re-name them either from a list or let's say
call it. Month 1, Month 2, Month 3 without having to type one by one.

Thanks in advance


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:03 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.