+ Reply to Thread
Results 1 to 6 of 6

Rank and Sumifs

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Upstate, SC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Rank and Sumifs

    I have a table of data with six columns: Create Date, Work Center, Material, Defect Type, Defect Location and Defect Qty.

    Creation Date Work Center Material Defect Type Defect Location Defect Qty.
    7/15/2013 QA-LINE 7210743-16 High / Low Spot A15 100
    7/15/2013 QD-LINE 7210743-16 High / Low Spot P10 100
    7/12/2013 QA-LINE 7210743-16 Buckle / Waves Y16 5
    7/15/2013 QD-LINE 7210743-16 Burrs A15 32
    7/15/2013 QD-LINE 7210743-16 Burrs A1 22

    Is there a formula that will sum the Defect Qty. for each Defect Type (each Defect Type may appear multiple times with different quantities) using selection criteria and return the Defect Type with the highest quantity, second highest quantity, third highest quantity ... etc. I've looked at Rank, Large, Index and Match combinations, but I am unable to find a solution.

    If possible, I would like to add selection criteria (e.g. Create Date is between Date 1 and Date 2, Work Center = QD-Line and Material = 7210743-16).

    Please let me know if I posted incorrectly; this is my first time using the forum. Thank you!
    Attached Images Attached Images
    Last edited by MEC; 08-21-2013 at 10:07 AM.

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Rank and Sumifs

    Could provide workbook with data and desired result?
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Registered User
    Join Date
    08-21-2013
    Location
    Upstate, SC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Rank and Sumifs

    The table on the left (yellow header row) is what I have. The table on the right (green header row) is what I would like to end up with ... with formulas creating each value in the table.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Rank and Sumifs

    I had to walk through a procedure something like this recently and I ended up using a pivot table do my aggregations (so you wont have to deal with new data with the sumifs) then using a helper table to rank the data and THEN populating another table to show the summarized results in order of rank.

    For me it was a list of biggest winners and losers in a particualr data set with 10k rows. There might be a more direct method, but I couldnt think of one that was easily auditable and decided to keep it simple and just use a helper tab.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  5. #5
    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
    53,048

    Re: Rank and Sumifs

    Hi and welcome to the forum

    To arrive at the answers you have in your workbook, use this, copied down...
    =SUMIF($F$2:$F$58,$J2,$H$2:$H$58)

    However, I notice that those totals dont include the data you have below row 58 (81:111)?

    to include thise as well, change that formula to...
    =SUMIF($F:$F,$J2,$H:$H)

    If you want to bring in additional criteria/restrictions such as "Work Center = QD-Line and Material = 7210743-16" between certain dates, you need to change the formula to a sumifS(). So it then becomes...

    =SUMIFS($H$2:$H$58,$F$2:$F$58,$J2,$D$2:$D$58,"QD-Line",$E$2:$E$58,"7210743-16") = 828

    To rank these values, we could create another similar table and use the rank() or large() functions to order them
    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

  6. #6
    Registered User
    Join Date
    08-21-2013
    Location
    Upstate, SC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Rank and Sumifs

    Thank you both for your responses.

    I found the following information online, and I was able to modify it for what I need. Thanks again!

    http://www.mrexcel.com/forum/excel-q...ring-text.html
    Last edited by MEC; 08-22-2013 at 06:53 AM.

+ 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. RANK - Non unique values, contiguous rank required
    By PaulBo in forum Excel General
    Replies: 9
    Last Post: 02-20-2014, 10:34 AM
  2. SUMIFS Puzzle - Trying to avoid adding multiple SUMIFS to get valid result
    By haldavid in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-09-2013, 03:42 PM
  3. Formula to Rank and populate values base don Rank
    By Excel Dumbo in forum Excel General
    Replies: 3
    Last Post: 10-09-2012, 02:02 AM
  4. [SOLVED] Sumifs, problem with the formula: =sumifs(c10:c200,<=today(),0)
    By Faustocruz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2012, 04:26 AM
  5. Replies: 1
    Last Post: 08-15-2005, 05: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