View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.links
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Application that separates Excel rows in new worksheets

This just uses the values in cells. If A1 thru A10 contains:

joe
jim
larry
curley
moe
felix
oscar
laverne
shirley
martha

then this macro will create a new workbook of the same names:

Sub shinra()
Dim s(10) As String
For i = 1 To 10
s(i - 1) = Cells(i, 1).Value
Next
For i = 1 To 10
ActiveWorkbook.SaveAs s(i - 1)
Next
End Sub

--
Gary''s Student - gsnu200724


"Shinra14" wrote:


Hello,

I was wondering if I can do the below with links in excel:

I want to create an application that will read an excel file that contains
the names of students in a course and creates a new excel file for each of
the students based on the source file. The name of each new excel file should
be the name of the student. I know I can create new worksheet and then link
the cells between the source file and the new file. However, can I somehow
have the link create a brand new excel file with the name of the contents of
the cell the link is in? For example, if I have a cell in a source file with
the name Paul. Can I have a link here that creates an all new excel file with
Paul as its name?

Thank You,