+ Reply to Thread
Results 1 to 6 of 6

Lookup largest, 2nd largest...value by subgroup from a list

  1. #1
    Registered User
    Join Date
    05-23-2011
    Location
    germany
    MS-Off Ver
    Office 365 Pro (Excel 2016)
    Posts
    45

    Lookup largest, 2nd largest...value by subgroup from a list

    HI there,

    I want to lookup the largest, 2nd...5th largest value from a list by subgroup (Resource group)
    The subgroups are not sorted in list.

    Please see the attached example for details.

    Many thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Lookup largest, 2nd largest...value by subgroup from a list

    Try this

    Using Naming Convention
    =LARGE(IF(Resources=E$4,Amounts),E5)

    OR

    Using Cells Naming Convention
    =LARGE(IF($A$5:$A$39=E$4,$C$5:$C$39),E5)

    • This is an array formula so you'll have to press simultaneously SHIFT + CTRL + ENTER keys to activate formula
    • Drag down formula down to last entry
    • Copy & Edit formula for the other two resource groups

    see attachment
    Attached Files Attached Files
    Last edited by Syrkrasi; 09-22-2017 at 01:55 PM.

  3. #3
    Registered User
    Join Date
    05-23-2011
    Location
    germany
    MS-Off Ver
    Office 365 Pro (Excel 2016)
    Posts
    45

    Re: Lookup largest, 2nd largest...value by subgroup from a list

    Hi,
    thank you very much!
    What do I need to add to this formula in order to make it retrieve
    the amounts per resource group X, Z, F by searching for the amounts in column RU instead of auxiliary column Resource group?
    I changed the formula to =LARGE(IF($A$5:$A$39=E$4&"*";$C$5:$C$39);E5), but I only get #NUM.
    Many thanks!

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Lookup largest, 2nd largest...value by subgroup from a list

    Hi pvp

    You can do this problem using a Pivot Table if you use the Resource as a filter and then use the Top 5 values to show and sort the Pivot from large to small. See the attached for the answer. Note - no formulas required, just a little Pivot Magic!

    PT top 5 filtered.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  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: Lookup largest, 2nd largest...value by subgroup from a list

    Edit I failed to mention that due to regional settings you will have to change the argument separators from "," to ";". My apologies.

    Try this array formula. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 09-23-2017 at 01:33 PM.
    Dave

  6. #6
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Lookup largest, 2nd largest...value by subgroup from a list

    Quote Originally Posted by pvp View Post
    What do I need to add to this formula in order to make it retrieve
    the amounts per resource group X, Z, F by searching for the amounts in column RU instead of auxiliary column Resource group?
    I changed the formula to =LARGE(IF($A$5:$A$39=E$4&"*";$C$5:$C$39);E5), but I only get #NUM.
    To get the RU you can use another array formula: INDEX & MATCH

    Using Naming Convention
    =INDEX(RU,MATCH(G5,AMOUNTS,0))

    OR

    Using Cells Naming Convention
    =INDEX($B$5:$B$39,MATCH(G5,$C$5:$C$39,0))

    • This is an array formula so you'll have to press simultaneously SHIFT + CTRL + ENTER keys to activate formula
    • Drag down formula down to last entry
    • Copy & Edit formula for the other two resource groups

    See attachment
    Attached Files Attached Files

+ 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 choosing largest or 2nd largest amount of consecutive 0's if a criteria is met
    By jonodillieono in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2016, 09:52 AM
  2. Finding largest value and second largest in a subset of data.
    By benjy99 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-01-2016, 09:41 AM
  3. Replies: 4
    Last Post: 04-04-2015, 04:24 AM
  4. Replies: 12
    Last Post: 08-02-2013, 01:43 PM
  5. Returning Max value, 2nd largest, 3rd largest, etc without duplicates
    By ARayburn in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 05-21-2013, 11:49 AM
  6. Lookup next largest date from static list of dates
    By jjcgirl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-20-2013, 04:14 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