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 |
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 |
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. |
All times are GMT +1. The time now is 09:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com