View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
R.VENKATARAMAN R.VENKATARAMAN is offline
external usenet poster
 
Posts: 74
Default macro to create a worksheet for every name on a list?

try this code
your list is in SHEET1 and in range D4 to D8


Option Explicit


Public Sub test()
Dim nname As String
Dim cell As Range
Worksheets("sheet1").Activate
For Each cell In Range("d4:d8")
cell.Activate
nname = ActiveCell.Value
Worksheets.Add after:=Sheet1

ActiveSheet.Name = nname
Worksheets("sheet1").Activate

Next

End Sub

aking1987 wrote in message
...

Hi, I have a similar enquiry...

BUt the opposite way round.

I can create the worksheets, but want the worksheet names to list in
cells on a master worksheet.

How do i do this?


--
aking1987
------------------------------------------------------------------------
aking1987's Profile:

http://www.excelforum.com/member.php...o&userid=15393
View this thread: http://www.excelforum.com/showthread...hreadid=277583