View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Rename worksheets with VBA

don't know if i have enough info from you , but if the sheet with the names is
named list, drag it si it's the last sheet

then this may do what you want

Option Explicit
Dim i As Long
Sub rename_sheets()
For i = 1 To Worksheets.Count - 1
Worksheets(i).Name = Sheets("list").Range("A" & i).Value
Next
End Sub
--


Gary


"systemx" wrote in
message ...

Hi all,

Was hoping someone could give me a tip with renaming worksheets.

I have around 80 worksheets to record data. I also have another
worksheet, which has a vertical list of names.

I would like Excel to rename all of the worksheets, according to
whatever the list is made up of.

ie. Worksheet 1 name = List A1, Worksheet 2 name = List A2 etc.

This is a once off task - so I can rename them all individually if
needed, but just wandering if there is an easy way to do this?

Thanks

Rob


--
systemx
------------------------------------------------------------------------
systemx's Profile:
http://www.excelforum.com/member.php...o&userid=29254
View this thread: http://www.excelforum.com/showthread...hreadid=523414