+ Reply to Thread
Results 1 to 10 of 10

Create New Worksheet for every row

  1. #1
    Registered User
    Join Date
    12-03-2006
    Posts
    12

    Create New Worksheet for every row

    I am looking to know how to create new worksheet for every row. I am trying to create a workout sheet for students at my school. I have a database with their max percentages for three lifts and am trying to use these to calculate percentages into a workout for each student.However, I am wondering if I can create a macro which will create a new worksheet for each student and fill in the corresponding max totals into the new worksheet? If this is possible, can someone please instruct me on how to go about programming this. Thank You. I have uploaded a pdf with an example of the list and workout if this will help resolve any problems with how I explained my question.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-15-2005
    Location
    North Carolina
    MS-Off Ver
    2003 & 2007
    Posts
    180
    Hi,
    This can be a start for you. I am assuming the Names are in Column A and so on. This will create a workbook in the same directory as the current one running the macro and name each workbook the name of the student. It will then copy those values you displayed.

    Please Login or Register  to view this content.
    HTH
    jtp

  3. #3
    Registered User
    Join Date
    12-03-2006
    Posts
    12
    This a great start. Now how would I get a worksheet with the workout on it to copy into these new workbooks so that the values which are put into the new workbook are used in it.

  4. #4
    Forum Contributor
    Join Date
    03-15-2005
    Location
    North Carolina
    MS-Off Ver
    2003 & 2007
    Posts
    180
    Are you wanting to copy the values from your source workbook into the new workbooks and then set a reference in the source workbook to the new workbook?

    Essentially this means that any changes made on the new workbook would update in the old source workbook.

    Is this what your looking for?

  5. #5
    Registered User
    Join Date
    12-03-2006
    Posts
    12
    Yes, this is what I'm trying to do

  6. #6
    Forum Contributor
    Join Date
    03-15-2005
    Location
    North Carolina
    MS-Off Ver
    2003 & 2007
    Posts
    180
    How about this

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-03-2006
    Posts
    12
    How would I get these values put into a workout for each student. By this I mean the values which were in the original list are put into a formula which calculates a specific percentage. Would I also have to create a worksheet which would act as a template with the percentages preset and have the values put into the template via the macro or would i have to type the formula into the script for each set and rep percentage I want?

  8. #8
    Forum Contributor
    Join Date
    03-15-2005
    Location
    North Carolina
    MS-Off Ver
    2003 & 2007
    Posts
    180
    I'm sorry its been a long night and i am a little slow at catching on. This formula your talking about for the percentages, it is applied to the numbers that were copied over from the source workbook and actually is in the A2, B2, C2 cells of the new workbook?

  9. #9
    Registered User
    Join Date
    12-03-2006
    Posts
    12
    Yes the numbers in the new workbooks would be applied to these formulas.

    Is it easier to create new worksheets within the existing workbook(the one before creating multiple) and link the values to original list or is it easier to create new workbooks altogether. I am talking about one sheet for row 2, then a new sheet for row 3 and so on but each sheet would be the same just with a new students numbers plugged. So the workbook would consist of the original list with students and their max weight listed, then a template workout to be replicated, then a worksheet for each student with a workout corresponding to their numbers.

    I.E. So if a student benches 100 lbs and i wanted him to do 60% for ten reps then 65% for 8. But these percentages would be based off the maxes in the original list.

    I hope this is clear on how I am trying to do this.

  10. #10
    Forum Contributor
    Join Date
    03-15-2005
    Location
    North Carolina
    MS-Off Ver
    2003 & 2007
    Posts
    180
    I would absolutely create worksheets in the main workbook just to keep from having to open up all the individual workbooks. That is unless you have a huge number of students? Then I would consider splitting them into maybe 2 or 3 workbooks and label them alphabetically.

    Here is the code for creating the worksheets rather than workbook.

    Please Login or Register  to view this content.
    I'm sorry but this is all the time I have for tonight. Hopefully someone can continue on with this for you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1