#1   Report Post  
Hru48
 
Posts: n/a
Default new 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=471742

  #2   Report Post  
Dave O
 
Posts: n/a
Default

Good morning, Hayley-
Replace this line
Nayme = ActiveCell.Value

.... with this one:
Nayme = Activecell.offset(0,-1).value

This will pick up the value in column B instead of column C.

  #3   Report Post  
Hru48
 
Posts: n/a
Default


Good afternoon, hope you are well :)

I replaced the line but it hasnt had any effect.. my sheets are still
being called bob(2) ... bob(3) ..etc.

?


--
Hru48
------------------------------------------------------------------------
Hru48's Profile: http://www.excelforum.com/member.php...o&userid=24895
View this thread: http://www.excelforum.com/showthread...hreadid=471742

  #4   Report Post  
Hru48
 
Posts: n/a
Default


ok, figured it out! I forgot to put in

ActiveSheet.Name = Nayme

but now that is there it works grand, thanks alot for all your help!!


--
Hru48
------------------------------------------------------------------------
Hru48's Profile: http://www.excelforum.com/member.php...o&userid=24895
View this thread: http://www.excelforum.com/showthread...hreadid=471742

  #5   Report Post  
Dave O
 
Posts: n/a
Default

Hayley- Our messages have crossed, what with two separate posts. Do
you mind contacting me via email? The address is cyclezen AT yahoo DOT
com



  #6   Report Post  
Dave O
 
Posts: n/a
Default

I just figured that out too. Glad to help!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find names on list 1 in list 2. list 1 4000 names list 2 400 name Ed Excel Worksheet Functions 1 September 4th 05 12:48 AM
Replace range names with cell references? KH Excel Worksheet Functions 2 August 2nd 05 01:09 AM
Finding Duplicate Names from Different Lists... PokerZan Excel Discussion (Misc queries) 1 July 8th 05 09:58 AM
sorting names alphabetically when names may start with numbers John Smith Excel Discussion (Misc queries) 3 May 11th 05 08:06 PM
How can I find the common names in two columns of names? hako Excel Discussion (Misc queries) 2 December 8th 04 01:59 AM


All times are GMT +1. The time now is 10:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"