Worksheet names

M

Melissa Blakley

I am creating a large workbook that requires I break down each week into a
seperate worksheet. Is there anyway I can set an auto naming feature to
label the worksheets for me or must I do it manually, one sheet at a time?
 
L

Luke M

Here's a short macro that names sheets based on a cell value. Using formulas,
you could adast this to suit:

Sub NameSheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Name = ws.Range("A1").Value
Next
End Sub
 
G

Gord Dibben

Do you have existing sheets that need re-naming?

How many and what do you want for labels?

This macro will rename to Week1, Week2 etc.

Sub RenameTabs()
For I = 1 To Sheets.Count
Sheets(I).Name = "Week" & I
Next
End Sub

If you don't have the sheets do you want to copy one template sheet many
times and name each copy?

Post back with some details.


Gord Dibben MS Excel MVP

On Fri, 23 Oct 2009 11:25:01 -0700, Melissa Blakley <Melissa
 

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