naming worksheets

S

Shooter

My workbook has 200 worksheets named with the default names ie: worksheet1,
worksheet2...worksheet200. I would like to rename all worksheets with just
the consecutive number ie: 1,2,3...200. Is there a method to do this quickly
or do I need to go in and rename each one individually. Thanks.
 
J

JulieD

Hi Shooter

you can use a little code routine such as
Sub namesheets()
Sheets(1).Activate
For i = 1 To 200
Sheets(i).Name = i
Next
End Sub

to use this:
1) right mouse click on any sheet tab, choose view code
2) choose insert module in the vbe window
3) copy & paste the above into the white sheet of paper on the right of your
screen
4) use ALT & F11 to switch back to your workbook
5) choose tools / macro / macros - namesheets and press the RUN Button

Hope this helps
Cheers
JulieD
 

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