Name the worksheet by a formula

A

annie

Hi, I need to name 31 worksheets as "1-Jul", "2-Jul", "3-Jul"...... 31-Jul.
Can Excel automatically name the worksheets by a formula which i set in a
certain cell? Thanks for your help. =)
 
D

Damon Longworth

You can use a macro similar to:

For i = 1 To 31
Sheets(i).Name = i & "-Jul"
Next

It will name the first 31 sheets as you desire. You can create something
similar to name them based upon your cell value.

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com
 
A

annie

Thanks Damon!

"Damon Longworth" <[email protected]> ¦b¶l¥ó
¤¤¼¶¼g...
You can use a macro similar to:

For i = 1 To 31
Sheets(i).Name = i & "-Jul"
Next

It will name the first 31 sheets as you desire. You can create something
similar to name them based upon your cell value.

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com
 
D

David McRitchie

Hi Annie,
I would suggest you name your sheets with numbers instead of month
names. For dates format them like year-month-day to allow you to
sort your worksheets by name. Same applies to filenames in a directory.
 
A

annie

I see. Thanks David! =)

"David McRitchie" <[email protected]> ¦b¶l¥ó
¤¤¼¶¼g...
Hi Annie,
I would suggest you name your sheets with numbers instead of month
names. For dates format them like year-month-day to allow you to
sort your worksheets by name. Same applies to filenames in a directory.
 
Top