Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default change name of sheet from list

Hi

I have a list on sheet "summary" range A5:A55

Is there a code I can cut and paste which will rename the other sheets in the
workbook from the summary sheet range A5:A55

thanks in advance


brian

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200710/1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default change name of sheet from list

One way. This takes the values from the range A5 down and uses those values
to rename all the worksheets in the workbook. If there is a blank cell
before all the sheets are renamed then the sub ends. Right click the sheet
tab with your list in, view code and paste this in:-

Sub renameit()
x = 5
On Error GoTo 100
For Each Worksheet In Worksheets
Worksheet.Name = Cells(x, 1).Value
x = x + 1
Next
100
End Sub

Mike

"BNT1 via OfficeKB.com" wrote:

Hi

I have a list on sheet "summary" range A5:A55

Is there a code I can cut and paste which will rename the other sheets in the
workbook from the summary sheet range A5:A55

thanks in advance


brian

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200710/1


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default change name of sheet from list

Thanks mike for the speedy reply,
work perfect

regards

Mike H wrote:
One way. This takes the values from the range A5 down and uses those values
to rename all the worksheets in the workbook. If there is a blank cell
before all the sheets are renamed then the sub ends. Right click the sheet
tab with your list in, view code and paste this in:-

Sub renameit()
x = 5
On Error GoTo 100
For Each Worksheet In Worksheets
Worksheet.Name = Cells(x, 1).Value
x = x + 1
Next
100
End Sub

Mike

Hi

[quoted text clipped - 6 lines]

brian


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200710/1

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default change name of sheet from list

Thanks mike for the speedy reply,
work perfect

regards

Mike H wrote:
One way. This takes the values from the range A5 down and uses those values
to rename all the worksheets in the workbook. If there is a blank cell
before all the sheets are renamed then the sub ends. Right click the sheet
tab with your list in, view code and paste this in:-

Sub renameit()
x = 5
On Error GoTo 100
For Each Worksheet In Worksheets
Worksheet.Name = Cells(x, 1).Value
x = x + 1
Next
100
End Sub

Mike

Hi

[quoted text clipped - 6 lines]

brian


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200710/1

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default change name of sheet from list

Thanks mike for the speedy reply,
work perfect

regards

Mike H wrote:
One way. This takes the values from the range A5 down and uses those values
to rename all the worksheets in the workbook. If there is a blank cell
before all the sheets are renamed then the sub ends. Right click the sheet
tab with your list in, view code and paste this in:-

Sub renameit()
x = 5
On Error GoTo 100
For Each Worksheet In Worksheets
Worksheet.Name = Cells(x, 1).Value
x = x + 1
Next
100
End Sub

Mike

Hi

[quoted text clipped - 6 lines]

brian


--
Message posted via http://www.officekb.com



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default change name of sheet from list

Hi

One last question
I have got dates in the list-- when tested with numbers it worked ok, but now
come to use with dates, does not run
have tried different formats

any idea's

regards

BNT1 wrote:
Thanks mike for the speedy reply,
work perfect

regards

One way. This takes the values from the range A5 down and uses those values
to rename all the worksheets in the workbook. If there is a blank cell

[quoted text clipped - 18 lines]

brian


--
Message posted via http://www.officekb.com

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default change name of sheet from list

Try this for your dates in range("a2:a??")

One way.
Sub namesheets()
For i = 5 To Cells(Rows.Count, "a").End(xlUp).Row
Sheets(i-3).Name = Format(Cells(i, "a"), "yyyy-mm-dd")
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"BNT1 via OfficeKB.com" <u19326@uwe wrote in message
news:7953d0b190ed5@uwe...
Hi

I have a list on sheet "summary" range A5:A55

Is there a code I can cut and paste which will rename the other sheets in
the
workbook from the summary sheet range A5:A55

thanks in advance


brian

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200710/1


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
change a vertical list of numbers to horizontal list from 1 cell caz Excel Discussion (Misc queries) 3 September 27th 06 12:11 PM
Links in Embedded doc within sheet don't change when sheet is copi Dan k Excel Discussion (Misc queries) 0 May 11th 06 05:41 PM
change info in other cells when i change a number in a drop list? macbr549 Excel Discussion (Misc queries) 2 September 11th 05 02:07 AM
sort list of players by team from player list on separate sheet Robert Excel Worksheet Functions 1 July 19th 05 01:57 AM
Change workbook sheet reference using cell A1 to change a vairable Reed Excel Worksheet Functions 4 January 20th 05 07:15 PM


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