Rename worksheets with VBA

S

systemx

Hi all,

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

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

I would like Excel to rename all of the worksheets, according t
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 i
needed, but just wandering if there is an easy way to do this?

Thanks

Ro
 
G

Gary Keramidas

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top