Creating a macro to name several tabs
Try:
Sub macro()
Dim i As Integer
On Error Resume Next
For i = 1 To Sheets.Count
Sheets(i).Name = Sheets(i).Range("B1").Value
Next i
On Error GoTo 0
End Sub
Hope this helps
Rowan
BitsofColour wrote:
I have this macro:
Sub Macro()
Sheets(1).Name = Range("b1").Value
Range("B17").Select
End Sub
and it works in renaming the tab to whatever is in cell "B1" but I have 30+
tabs that I need to run this for and I can't figure out the rest of the macro
needed for this to go thru all of the tabs and not just the first one.
Any help would be appreciated!
Thanks
|