Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Automatically name all Sheet Tabs from a list
Can Someone help with this formula
This formula below will rename sheet tabs by coping the data from column A What I would like it to do is to skip the header row A1 and then rename the sheets starting from A2. Can this be done? Sub NameSheets() For sh = 1 To 15 Sheets(sh + 2).Name = Range("A" & sh).Value Next sh End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Automatically name all Sheet Tabs from a list
The below will rename 2nd sheet onwards from Range A2-A16.
Sub NameSheets() For sh = 1 To 15 Activeworkbook.Sheets(sh + 2).Name = Range("A" & sh+1) Next sh End Sub If this post helps click Yes --------------- Jacob Skaria "aussiegirlone" wrote: Can Someone help with this formula This formula below will rename sheet tabs by coping the data from column A What I would like it to do is to skip the header row A1 and then rename the sheets starting from A2. Can this be done? Sub NameSheets() For sh = 1 To 15 Sheets(sh + 2).Name = Range("A" & sh).Value Next sh End Sub |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Automatically name all Sheet Tabs from a list
Yes thats works beautifully
"Jacob Skaria" wrote: The below will rename 2nd sheet onwards from Range A2-A16. Sub NameSheets() For sh = 1 To 15 Activeworkbook.Sheets(sh + 2).Name = Range("A" & sh+1) Next sh End Sub If this post helps click Yes --------------- Jacob Skaria "aussiegirlone" wrote: Can Someone help with this formula This formula below will rename sheet tabs by coping the data from column A What I would like it to do is to skip the header row A1 and then rename the sheets starting from A2. Can this be done? Sub NameSheets() For sh = 1 To 15 Sheets(sh + 2).Name = Range("A" & sh).Value Next sh End Sub |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Automatically name all Sheet Tabs from a list
It works beautifully
Thankyou very much. "Jacob Skaria" wrote: The below will rename 2nd sheet onwards from Range A2-A16. Sub NameSheets() For sh = 1 To 15 Activeworkbook.Sheets(sh + 2).Name = Range("A" & sh+1) Next sh End Sub If this post helps click Yes --------------- Jacob Skaria "aussiegirlone" wrote: Can Someone help with this formula This formula below will rename sheet tabs by coping the data from column A What I would like it to do is to skip the header row A1 and then rename the sheets starting from A2. Can this be done? Sub NameSheets() For sh = 1 To 15 Sheets(sh + 2).Name = Range("A" & sh).Value Next sh End Sub |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Automatically name all Sheet Tabs from a list
Jacob - I had trouble w/ your code. When I run your exact code on Excel 2007 I get "Run-Time error '9': Subscript out of range. I am a real rookie on this VBA code. I also need to change the fixed-value of 15 to be the last column# in row 1 I use this code to find the last column number with data in row 1 ' Holds last column number ' Range("A1").Select ' Range(Selection, Selection.End(xlToRight)).Select ' Selection.End(xlToRight).Select ' LastCol = ActiveCell.Column I'd appreciate your help to insert worksheets with the names in A2:LastCol -- Thanks for your reply & assistance. Jimbo213 "Jacob Skaria" wrote: The below will rename 2nd sheet onwards from Range A2-A16. Sub NameSheets() For sh = 1 To 15 Activeworkbook.Sheets(sh + 2).Name = Range("A" & sh+1) Next sh End Sub If this post helps click Yes --------------- Jacob Skaria "aussiegirlone" wrote: Can Someone help with this formula This formula below will rename sheet tabs by coping the data from column A What I would like it to do is to skip the header row A1 and then rename the sheets starting from A2. Can this be done? Sub NameSheets() For sh = 1 To 15 Sheets(sh + 2).Name = Range("A" & sh).Value Next sh End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
tabs are missing even though 'tools-options-view-sheet tabs' ok? | Excel Worksheet Functions | |||
Automatically create list in different sheet on basis of other lis | Excel Worksheet Functions | |||
Automatically Name Tabs from List on Worksheet Named Team | Excel Discussion (Misc queries) | |||
Creating Sheet Tabs from a list | Excel Discussion (Misc queries) | |||
Name sheet tabs with a cell list | Excel Discussion (Misc queries) |