+ Reply to Thread
Results 1 to 2 of 2

Extracting a Result Based on a Condition

  1. #1
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    812

    Extracting a Result Based on a Condition

    Hi,

    In column A I have a list of names, many occurring more than once.

    In column B there is a value associated with each name in column A.

    Can someone please suggest a formula that will return the nth-largest name by its total summed value in column B

    So, for example, if there are 10 instances of the name “John” in column A, each with a value of 1 in column B (so “John” has a total of 10), and if 10 is the largest summed value per name, then my formula would return “John” as the first result. If all values associated with “Paul” sum to 9, then “Paul” would return as the second result, etc.

    Thanks!

  2. #2
    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: Extracting a Result Based on a Condition

    Here is an example that maybe helpful to you

    Step 1
    in D2 use this formula to get unique list of names:

    =IFERROR(INDEX($A$2:$A$11,MATCH(0,INDEX(COUNTIF(D$1:D1,$A$2:$A$11),,),)),"")

    Step 2

    use this formula in C2

    =SUMIF($A$2:$A$11,D2,$B$2:$B$11)

    then apply filter to the fist row and filter out by: "Sort Largest to Smallest"

    Row\Col
    A
    B
    C
    D
    1
    Name Count Total Unique Name
    2
    John
    1
    5
    John
    3
    Carl
    1
    3
    Carl
    4
    Steve
    1
    2
    Steve
    5
    Carl
    1
    6
    John
    1
    7
    John
    1
    8
    John
    1
    9
    Steve
    1
    10
    Carl
    1
    11
    John
    1
    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

+ 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 for if condition formula result only either hit or miss from mulitple condition
    By breadwinner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2013, 07:29 AM
  2. Extracting Data Based on Yes or No Condition
    By leowyatt in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-19-2013, 09:02 AM
  3. [SOLVED] Extracting multiple values based on the condition...Pls help (Urgnt)
    By krratheesh80 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2012, 10:06 AM
  4. Return desired result based on a condition (to show 0% instead of #div/0)
    By devilchild99 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-17-2012, 03:22 PM
  5. Return desired result based on a condition
    By devilchild99 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-17-2012, 01:00 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