+ Reply to Thread
Results 1 to 5 of 5

Help Needed with Writing Top 3 and Bottom 3 Formula

  1. #1
    Registered User
    Join Date
    10-05-2017
    Location
    Polaris
    MS-Off Ver
    2013
    Posts
    2

    Help Needed with Writing Top 3 and Bottom 3 Formula

    I am having trouble trying to figure out how I would have Excel grab top 3 and bottom 3 from a set of raw data.

    For example, I have raw data containing Student's Name, Student's Grade, Student's Class Size, Grade Date, and Student Feedback. I have another data set with the Student's Class Size Preference.

    I want a report that pulls out the Student's top 3 and bottom 3 scores and feedback only if Grade Date range is (ex: 9-1/2017 - 9/30/2017) and if Student's Class Size is greater or equal to their Class Size Preference.

    Help much appreciated.

    Dummy Data: https://www.dropbox.com/s/6xkahig05r...mple.xlsx?dl=0.
    Last edited by Moonhana; 10-05-2017 at 04:01 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Help Needed with Writing Top 3 and Bottom 3 Formula

    Hi, welcome to the forum

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

    Having said that, take a look at the LARGE and SMALL functions
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-05-2017
    Location
    Polaris
    MS-Off Ver
    2013
    Posts
    2

    Re: Help Needed with Writing Top 3 and Bottom 3 Formula

    Thanks Ford. I was not able to upload to forum. So I linked it to DropBox: https://www.dropbox.com/s/6xkahig05r...mple.xlsx?dl=0.

    I'll play around with Large and Small. The only thing I am having trouble with is that I need it match very specific criteria/conditions. Only return top 3 and bottom 3 if that top 3 and bottom 3 falls within a specific date range and class size preference depending on specific student.

  4. #4
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Help Needed with Writing Top 3 and Bottom 3 Formula

    You may be able to accomplish some of that with just a pivot table/chart.

    However what you could do to factor all of your criteria is setup a table and calculate the top/bottom 3 using your criteria and then base a chart off of that. Either that or manually filter it down to what you want and chart that filtered result.

    LARGE and SMALL are good functions to know, but they do not alone take any conditions. They just let you get the nth largest or nth smallest value in a data set.

    You will likely need to use is an array formula including some of the following or maybe others as well:

    SUMPRODUCT
    INDEX
    IF
    LARGE
    SMALL

    I cant use dropbox to get your sample so I cant give a specific example. Sorry

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Help Needed with Writing Top 3 and Bottom 3 Formula

    Quote Originally Posted by Moonhana View Post
    Thanks Ford. I was not able to upload to forum. So I linked it to DropBox.........
    Moonhana many of us are reluctant to download from 3rd party sites. You are better off uploading directly to the forum.

    If you used the paperclip icon to upload that hasn't worked for some time.

    Try these steps one more time.
    To attach a file to your post,
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Last edited by FlameRetired; 10-05-2017 at 07:14 PM.
    Dave

+ 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. [SOLVED] Help needed with writing an If/Then conditional formula regarding formatting
    By judybthe1 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-08-2015, 02:45 PM
  2. Help needed for creating array and writing formula in VBA, code included
    By yanheng in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2012, 02:00 PM
  3. If Funcion Writing Help Needed
    By joann0326 in forum Excel General
    Replies: 7
    Last Post: 03-09-2012, 12:10 PM
  4. Replies: 26
    Last Post: 03-18-2009, 09:44 AM
  5. Finding the Min number needed, for bottom cell to be greater than top?
    By Newbie2007 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-17-2009, 09:54 AM
  6. Help needed Writing formula that totals data at end of column
    By sid in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-12-2006, 02:25 PM
  7. Code needed to find records from bottom up
    By Andy in forum Excel General
    Replies: 4
    Last Post: 12-04-2005, 11:30 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