Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
I have a list of names in a range "A2:A65" on a sheet called ops names. In the same workbook I have a sheet for each different name, (sheets2 to 65) What I would like to do is to rename the sheets with the names in the range. So the name in cell A2 becomes the sheet name of sheet 2, and so on and so on. The spreadsheet is used for time sheets, but the staff are not always the same each month, hence the reason the change sheet names. Any help greatly appreciated. best regards Andy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Andy,
Simple loop required For i = 2 To ActiveWorkbook.Worksheets.Count Worksheets(i).Name = Worksheets("ops names").Cells(i, "A").Value Next -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Andy Healey" wrote in message ... Hi all I have a list of names in a range "A2:A65" on a sheet called ops names. In the same workbook I have a sheet for each different name, (sheets2 to 65) What I would like to do is to rename the sheets with the names in the range. So the name in cell A2 becomes the sheet name of sheet 2, and so on and so on. The spreadsheet is used for time sheets, but the staff are not always the same each month, hence the reason the change sheet names. Any help greatly appreciated. best regards Andy |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Andy
Try this with the sheet names as first Sub test() For a = 2 To ThisWorkbook.Sheets.Count On Error Resume Next Sheets(a).Name = Sheets("names").Cells(a, "A").Value On Error GoTo 0 Next End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Andy Healey" wrote in message ... Hi all I have a list of names in a range "A2:A65" on a sheet called ops names. In the same workbook I have a sheet for each different name, (sheets2 to 65) What I would like to do is to rename the sheets with the names in the range. So the name in cell A2 becomes the sheet name of sheet 2, and so on and so on. The spreadsheet is used for time sheets, but the staff are not always the same each month, hence the reason the change sheet names. Any help greatly appreciated. best regards Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing Defined Names | Excel Worksheet Functions | |||
Cell names = sheet names | Excel Worksheet Functions | |||
Changing mulitple tab names | Excel Worksheet Functions | |||
Changing the order of names... | New Users to Excel | |||
changing file names | Excel Discussion (Misc queries) |