![]() |
Tab names
hey guys, I now have this it of code thanks to a very nice man from he Sub NewSheets() Dim K As Byte, Inndex As Byte Dim Nayme As String Sheets("LIST").Select Range("c1").Select Do Until ActiveCell.Value = "" Nayme = ActiveCell.Value Sheets("bob").Copy After:=Sheets(2) Inndex = ActiveSheet.Index Range("A6").Select ActiveCell.Formula = "=LIST!C" & 1 + K ActiveSheet.Move After:=Sheets(Inndex + K) Sheets("LIST").Select ActiveCell.Offset(1, 0).Select K = K + 1 Loop End Sub but does anyone know how i can adjust it so that the new sheets it creates are name from a list of values in column B... So it will create the sheets and change the name on each sheet from the code above and then put a name on the new tabs/ sheets from the value of the cell in column B. It will also work down the list so the first sheet will be the value of B1, the second sheet will be whats in B2 etc. Cheers Hayley -- Hru48 ------------------------------------------------------------------------ Hru48's Profile: http://www.excelforum.com/member.php...o&userid=24895 View this thread: http://www.excelforum.com/showthread...hreadid=471743 |
Tab names
Sub NewSheets()
Dim K As Long, Inndex As Long Dim Nayme As String Sheets("LIST").Select Range("B1").Select Do Until ActiveCell.Value = "" Nayme = ActiveCell.Value Sheets("bob").Copy After:=Sheets(Sheets.count) ActiveSheet.Name = Nayme Range("A6").Select ActiveCell.Formula = "=LIST!B" & 1 + K Sheets("LIST").Select ActiveCell.Offset(1, 0).Select K = K + 1 Loop End Sub -- Regards, Tom Ogilvy "Hru48" wrote in message ... hey guys, I now have this it of code thanks to a very nice man from he Sub NewSheets() Dim K As Byte, Inndex As Byte Dim Nayme As String Sheets("LIST").Select Range("c1").Select Do Until ActiveCell.Value = "" Nayme = ActiveCell.Value Sheets("bob").Copy After:=Sheets(2) Inndex = ActiveSheet.Index Range("A6").Select ActiveCell.Formula = "=LIST!C" & 1 + K ActiveSheet.Move After:=Sheets(Inndex + K) Sheets("LIST").Select ActiveCell.Offset(1, 0).Select K = K + 1 Loop End Sub but does anyone know how i can adjust it so that the new sheets it creates are name from a list of values in column B... So it will create the sheets and change the name on each sheet from the code above and then put a name on the new tabs/ sheets from the value of the cell in column B. It will also work down the list so the first sheet will be the value of B1, the second sheet will be whats in B2 etc. Cheers Hayley -- Hru48 ------------------------------------------------------------------------ Hru48's Profile: http://www.excelforum.com/member.php...o&userid=24895 View this thread: http://www.excelforum.com/showthread...hreadid=471743 |
Tab names
Thats great, but i need the tab names to be taken from column b and th names which are updated in a6 of each new sheet to still be taken fro column c. any ideas? cheer -- Hru4 ----------------------------------------------------------------------- Hru48's Profile: http://www.excelforum.com/member.php...fo&userid=2489 View this thread: http://www.excelforum.com/showthread.php?threadid=47174 |
Tab names
Sub NewSheets()
Dim K As Long, Inndex As Long Dim Nayme As String Sheets("LIST").Select Range("B1").Select Do Until ActiveCell.Value = "" Nayme = ActiveCell.Value Sheets("bob").Copy After:=Sheets(Sheets.count) ActiveSheet.Name = Nayme Range("A6").Select ActiveCell.Formula = "=LIST!C" & 1 + K Sheets("LIST").Select ActiveCell.Offset(1, 0).Select K = K + 1 Loop End Sub -- Regards, Tom Ogilvy "Hru48" wrote in message ... Thats great, but i need the tab names to be taken from column b and the names which are updated in a6 of each new sheet to still be taken from column c. any ideas? cheers -- Hru48 ------------------------------------------------------------------------ Hru48's Profile: http://www.excelforum.com/member.php...o&userid=24895 View this thread: http://www.excelforum.com/showthread...hreadid=471743 |
All times are GMT +1. The time now is 01:46 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com