ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Links and Linking in Excel (https://www.excelbanter.com/links-linking-excel/)
-   -   Application that separates Excel rows in new worksheets (https://www.excelbanter.com/links-linking-excel/137770-application-separates-excel-rows-new-worksheets.html)

Shinra14

Application that separates Excel rows in new worksheets
 

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,


Gary''s Student

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,



All times are GMT +1. The time now is 03:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com