+ Reply to Thread
Results 1 to 8 of 8

Need to Sum Values Based on Common Criteria and then pull out the top values...

  1. #1
    Registered User
    Join Date
    09-05-2010
    Location
    Baltimore, USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Need to Sum Values Based on Common Criteria and then pull out the top values...

    Criteria 1 Criteria 2 Value
    A # 5
    A $ 2
    A % 6
    A # 3
    A ! 4
    A % 7
    B $ 2
    B $ 3
    B # 6
    B @ 8
    B @ 5
    B ! 7

    See above for an example... I want to pull the top 3 SUM of the Values in which the first column equals B. So... for the first large Value, I want it to know that the output should be "@" and the value is 13, because for Criteria 1 = B, Criteria 2 "@" has the highest sum of values. Next, for large 2, I want it to know to pull "!" because that value is 7, which is larger than # (6) and $ (5), etc.

    I want it to be completely dynamic, so I can tell it to look within whichever Criteria 1 I want, and it will pull Criteria 2 and the sum value.

    Any ideas?

  2. #2
    Registered User
    Join Date
    09-05-2010
    Location
    Baltimore, USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Need to Sum Values Based on Common Criteria and then pull out the top values...

    I want to add, that let's assume we have thousands of lines of data...

  3. #3
    Registered User
    Join Date
    09-05-2010
    Location
    Baltimore, USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Need to Sum Values Based on Common Criteria and then pull out the top values...

    I imagine we can write a Macro that tells it to look at the first two columns and sum the third column based on commonality?

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Need to Sum Values Based on Common Criteria and then pull out the top values...

    Deleted. post totally irrelevant.
    Last edited by AlKey; 02-11-2016 at 11:47 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,531

    Re: Need to Sum Values Based on Common Criteria and then pull out the top values...

    I am going to suggest a pivot table solution, with criteria 1 as the report filter. Here is a file that uses the data you supplied applied to a pivot table:
    Pivot Table Top Three.xlsx
    I don't remember whether or not the 2007 version allows slicers, but if so they might be more convenient than the report filter.
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Need to Sum Values Based on Common Criteria and then pull out the top values...

    assuming your data is in A1 to C12 then In I1 type # in I2 $ in I3 % in I4 ! In I5 @

    in E1 copy paste below hold control and shift together then hit enter to make it array formula and drag to right to 3 columns if you drag to 4th column you will get 4th largest value
    =LARGE(SUMIFS($C$1:$C$12,$B$1:$B$12,$I$1:$I$5,$A$1:$A$12,"B"),COLUMNS($A$1:A1))
    Attached Files Attached Files
    Last edited by hemesh; 02-11-2016 at 12:14 PM.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  7. #7
    Registered User
    Join Date
    09-05-2010
    Location
    Baltimore, USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Need to Sum Values Based on Common Criteria and then pull out the top values...

    Good thought hemesh, except instead of 4 variables, let's say there are 1,000 variables...

  8. #8
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Need to Sum Values Based on Common Criteria and then pull out the top values...

    please upload a sample file

+ 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. How can I fill in values for a field based on common ID number?
    By thepinkgeologist in forum Excel General
    Replies: 5
    Last Post: 06-23-2015, 12:02 PM
  2. Merge column values in one row based on common key
    By ashokkumar2412 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-31-2014, 09:52 AM
  3. [SOLVED] Count values in one list and then narrow/combine values based on criteria
    By razz0807 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2013, 08:02 AM
  4. Grouping rows based on common values
    By jfd456 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2012, 06:31 AM
  5. Replies: 5
    Last Post: 01-27-2012, 02:37 PM
  6. Pull values from input based on multiple criteria
    By chitownsox14 in forum Excel General
    Replies: 3
    Last Post: 04-05-2011, 02:17 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