+ Reply to Thread
Results 1 to 5 of 5

Find a student's 3 lowest scoring tests

  1. #1
    Registered User
    Join Date
    04-29-2011
    Location
    Fresno, CA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Find a student's 3 lowest scoring tests

    Hello VBA pro's,

    I have attached a workbook that shows what I would like to do.

    I am a teacher and use excel as my grade book. The grade book will contain 30 to 40 tests (I only did 10ish on the example worksheet) in columns with student names in the corresponding rows. I would like to write a VBA subroutine that scans each student's scores (in the rows) and then reports to me what their 3 lowest tests are (not the scores themselves but the testnames). These testnames will then be returned to a separate range like the one in the middle of the sheet.


    Thank you in advanced for your help.
    Attached Files Attached Files

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Find a student's 3 lowest scoring tests

    Steve_G_2,

    The code I came up with works and returns the desired results, but I wouldn't exactly call it efficient. I just couldn't come up with a better way to do it. Here's the code:

    Please Login or Register  to view this content.


    Notes:
    If, on your real spreadsheet, the following are different, just change the code to the correct values:
    • NameResultCol (This is the column that contains "Bill's 3 Lowest" etc. In the sample you provided, it was column E)
    • NameResultRow (This is the row that "Bill's 3 Lowest" etc. starts on. In the sample you provided, it was row 13)
    • TestNameRow (This is the row that contains the tests' names. In the sample you provided, it was row 1)

    I have attached a modified version of your workbook so you can see how it works

    Hope that helps,
    ~tigeravatar
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    10-08-2006
    Location
    Walnut, CA
    MS-Off Ver
    2003,2010, Office 365
    Posts
    114

    Re: Find a student's 3 lowest scoring tests

    Hi,

    Try this, run Macro FindLScores and check the result in Sheets("Result")

    Tony
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Find a student's 3 lowest scoring tests

    I appreciate you explicitly requested a Macro for this but in truth you could achieve the same with formulae - using your sample file:

    Please Login or Register  to view this content.
    Obviously, if so desired you could also link the names.

  5. #5
    Registered User
    Join Date
    04-29-2011
    Location
    Fresno, CA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Find a student's 3 lowest scoring tests

    Thank you for the help. You are all fabulous.

+ 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