+ Reply to Thread
Results 1 to 9 of 9

Lowest average of student and return student name

  1. #1
    Registered User
    Join Date
    08-24-2018
    Location
    London
    MS-Off Ver
    2017
    Posts
    7

    Lowest average of student and return student name

    EXCEL.JPG

    This solution needs to be a formula that must be within one cell and needs to be dynamic(e.g changes).

    Q.

    Return the 2nd letter for the name of a student with the lowest average score?

    So far I have this =MIN(AVERAGEIF(A2:A11,A14:A16,C2:C1)) which gives me the lowest average but doesn't leave a reference for me to find the ID.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lowest average of student and return student name

    One way... again using an array formula:

    =MID(INDEX(B:B,SUMPRODUCT((AVERAGEIF(A2:A9,A14:A16,C2:C9)=MIN(AVERAGEIF(A2:A9,A14:A16,C2:C9)))*ROW(B14:B16))),2,1)

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    08-24-2018
    Location
    London
    MS-Off Ver
    2017
    Posts
    7

    Re: Lowest average of student and return student name

    Hi, Glenn thank you for the help really appreciate it. By any chance could you explain the logic of the formula to me. I am a bit confused why you used B:B.
    Last edited by johnsnider1; 08-24-2018 at 05:13 AM.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lowest average of student and return student name

    This bit:
    (AVERAGEIF(A2:A9,A14:A16,C2:C9)=MIN(AVERAGEIF(A2:A9,A14:A16,C2:C9))
    resolves to FALSE,TRUE,FALSE, being the data raw where the average equals the minumum of the average. I multiplied that by the row number:
    *ROW(B14:B16)
    which returns 0,15,0 and which sumproduct returns the sum of those (i.e. 15). That is the row number corresponding to the lowest average. INDEX (B:B returns the value. i could have used B1:B16, but using B:B causes no performance issues and does not require to be adjusted if/when the data gets longer.

    MID(result,2,1) returns the 2nd letter of the name.


    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  5. #5
    Registered User
    Join Date
    08-24-2018
    Location
    London
    MS-Off Ver
    2017
    Posts
    7

    Re: Lowest average of student and return student name

    About the B1:B16 why is it all the way down to 16, how come it can't be B14:B16. How would I do it if I decided to move the names to the side e.g. positions E1:G4.
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lowest average of student and return student name

    Here are 3 working options for you to choose from. You need to remember that INDEX works with SHEET row numbers. So if you use anthing OTHER than a form that uses the range starting from B1 (such as B1:Bxxx, or B:B) then you need to add in a couple of terms to correct.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-24-2018
    Location
    London
    MS-Off Ver
    2017
    Posts
    7

    Re: Lowest average of student and return student name

    Ah I see now, yeah that wouldn't make sense if I didn't start from row 1. Thank you for the help, I really appreciate it you're a legend.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lowest average of student and return student name

    No problem. You're welcome. It's a personal preference thing. Some people like to use the row(range)-row(data start)+1 thing to keep it compatible with earlier (Excel 2003 and before) versions of Excel, when whole column references were not allowed.
    Last edited by Glenn Kennedy; 08-24-2018 at 06:18 AM.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,663

    Re: Lowest average of student and return student name

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    If you have less than 10 posts, do not try to copy and paste the link. Instead, type the link out in your thread.

    No further help to be offered, please, until the OP has complied with this request.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Finding lowest scoring topics for student
    By bones23 in forum Excel General
    Replies: 2
    Last Post: 03-11-2015, 03:53 PM
  2. [SOLVED] Identifying the Lowest grade for a student
    By Doofus1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-05-2014, 08:14 AM
  3. Replies: 1
    Last Post: 02-06-2014, 08:07 AM
  4. Replies: 12
    Last Post: 07-11-2013, 03:30 AM
  5. Find a student's 3 lowest scoring tests
    By Steve_G_2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-30-2011, 04:53 PM
  6. Replies: 1
    Last Post: 11-09-2008, 10:34 PM
  7. [SOLVED] average student grades
    By billynolan in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 09-08-2005, 12:05 PM

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