naming sheets

J

James

hi guys!
is there a way to rename multiple sheets in a workbook at the same time,
keeping them in sequential order? for example instead of sheet 1. sheet 2,
etc.
i could rename it my data1, my data 2...


TIA

James
 
C

Cesar Zapata

James,

One way


Sub sheetnames()

Dim sh As Worksheet

For Each sh In Worksheets
sh.Name = "data" & sh.Index
Next sh

End Sub

this will change to data1,datat2 note that sheets will be renamed in
the order they are.


Cesar
hi guys!
is there a way to rename multiple sheets in a workbook at the same time,
keeping them in sequential order? for example instead of sheet 1. sheet 2,
etc.
i could rename it my data1, my data 2...


TIA

James
j
 
Top