+ Reply to Thread
Results 1 to 11 of 11

Combing Student list and Classes they took to one sheet

  1. #1
    Registered User
    Join Date
    07-03-2010
    Location
    london, england
    MS-Off Ver
    Excel 2004
    Posts
    27

    Combing Student list and Classes they took to one sheet

    This is the last step I have in a larger project. Any help would be appreciated. A sample workbook is attached with a desired results tab.

    In one sheet (List of People): I have a list of Student Names and each grade level they attended while at my school.
    In another sheet (Class Breakdown): I have a list of the kids and the classes they took. One can assume that for the Students that were there for more than one year, they took the same breakdown of classes each year [the Class Breakdown sheet contains no year information, only student and class].

    For each entry in 'List of People' I need unique lines for each class that person took. So for example: in 'Class Breakdown' Amanda has taken 4 classes: Math, Philosophy, English, and French. In 'List of People' I have that Amanda went here for 3 years
    Please Login or Register  to view this content.
    So I would then need the results page to show
    Please Login or Register  to view this content.

    Any help would be appreciated. It is important to note, that there will also be numbers in the columns to the right of this information (hense the random data in the sample spreadsheet).
    Attached Files Attached Files
    Last edited by minimacros; 07-13-2010 at 12:43 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Combing Student list and Classes they took to one sheet

    Hello minimacros,

    Please check your post. I don't see any attached file.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-03-2010
    Location
    london, england
    MS-Off Ver
    Excel 2004
    Posts
    27

    Re: Combing Student list and Classes they took to one sheet

    Sorry about that, I've attached it above

  4. #4
    Registered User
    Join Date
    07-03-2010
    Location
    london, england
    MS-Off Ver
    Excel 2004
    Posts
    27

    Re: Combing Student list and Classes they took to one sheet

    Bump - Any help is appreciated...

  5. #5
    Registered User
    Join Date
    07-03-2010
    Location
    london, england
    MS-Off Ver
    Excel 2004
    Posts
    27

    Re: Combing Student list and Classes they took to one sheet

    Bump - bueller, bueller?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Combing Student list and Classes they took to one sheet

    Hello minimacros,

    I wanted to ask you about this layout. It seems a little odd that each student has Q1 - Q4 numbers, yet the the classes remain the same for each year while these values change. I have never attended any school where I took the same classes year to year.I am bring this up because if you need yearly information then the code should be setup to do that now rather than later.

  7. #7
    Registered User
    Join Date
    07-03-2010
    Location
    london, england
    MS-Off Ver
    Excel 2004
    Posts
    27

    Re: Combing Student list and Classes they took to one sheet

    Hey Thanks for getting back to me, this issue has been killing me and is really the last hurdle in finishing a project... The actual project really has nothing to do with class schedules, but is a lot harder to explain. I used the classes example hoping it would make the project easier to understand. In actuality the Grade Level is an Area of spending, the student is a department and the classes are things the departments are working on.

    I originally made the mistake of doing this all in one Macro (http://www.excelforum.com/excel-prog...es-to-1-a.html) but realized it was easier to break it down. I now have only one unique entry for each combination of 'Area of Spending' and 'Dept' (http://www.excelforum.com/excel-prog...liar-rows.html). I also have the correct formula to put in these sections to automatically figure out the breakdown and multiply it by the correct quarter data. The last step is getting the data set up correctly in this form in order for the formula to work.

  8. #8
    Registered User
    Join Date
    07-03-2010
    Location
    london, england
    MS-Off Ver
    Excel 2004
    Posts
    27

    Re: Combing Student list and Classes they took to one sheet

    Any help would be appreciated... even maybe just a place to start..

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Combing Student list and Classes they took to one sheet

    Hi minimacros
    See if this code does as you require
    Please Login or Register  to view this content.
    Let me know of issues.
    John
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  10. #10
    Registered User
    Join Date
    07-03-2010
    Location
    london, england
    MS-Off Ver
    Excel 2004
    Posts
    27

    Re: Combing Student list and Classes they took to one sheet

    Jaslike - You're my hero... Code works great. It is very simple, I am able to understand it completely, I just wasn't able to write it. Thank you so much. I have ordered Power programming for Excel VBA (recommended to me), so hopefully I will be able to contribute more to this online forum.

    I have added the following below (Clear End Results, and make Bold any instances of People with no class data - Sort of a utility to make sure the data is good)


    Please Login or Register  to view this content.
    Quick question for you - What does Option Explicit do... I read a little about it and basically found out it is on by default... does this mean it is unnecessary? Will it affect any other Macros I might have in the workbook?

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Combing Student list and Classes they took to one sheet

    Hi minimacros

    Option Explicit requires that you declare all your variables. It helps in compiling. If you have variables declared and misspell one, the compiler will throw and error. To read more about the subject, follow this link http://www.cpearson.com/excel/DeclaringVariables.aspx

    I believe it affects all procedures in the project, so, if you have undeclared variables in the project, the compiler will find them.

    I'm glad the code works for you. If you're satisfied with the solution, please mark your post as solved. A click on the scales would be appreciated.
    John

+ 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