+ Reply to Thread
Results 1 to 8 of 8

Return Value Of The Columns Based Upon Highest Value In Another

  1. #1
    Registered User
    Join Date
    06-10-2010
    Location
    Berkshire, England
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    67

    Return Value Of The Columns Based Upon Highest Value In Another

    Hello all. I've come unstuck trying to use the correct formula to find the result I'm after. Example file attached.

    I would like to return the ID and Item for the highest value per Item.

    For example, the highest value of Item 'A6' = 750, so need to return ID of '4' and Item of 'A6'.

    (My actual file contacts tens of thousands of records).
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Return Value Of The Columns Based Upon Highest Value In Another

    i doubt you are still using Excel 2007 - please update your profile.

    In the sample workbook, please mock up the results you are looking for. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-10-2010
    Location
    Berkshire, England
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    67

    Re: Return Value Of The Columns Based Upon Highest Value In Another

    Revised example file now attached displaying the proposed results I'd like to retrieve.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Return Value Of The Columns Based Upon Highest Value In Another

    So the ID number for each Item will ALWAYS be unique, e.g this...

    ID ITEM VALUE
    2 A4 350
    2 A4 370

    can never happen?

    I'm think Pivot Table or PowerQuery so each item is listed
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Return Value Of The Columns Based Upon Highest Value In Another

    A basic SUMIFS is all you need. In H2 copied down:

    =SUMIFS($C$2:$C$14,$A$2:$A$14,G2,$B$2:$B$14,F2)

  6. #6
    Registered User
    Join Date
    06-10-2010
    Location
    Berkshire, England
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    67

    Re: Return Value Of The Columns Based Upon Highest Value In Another

    Thanks. That doesn't seem to do anything, however. It merely returns the Value from every row.

    In the results, only 1 result should appear per Item. So from my overall file, I may have 50 records with an Item of 'A1'. I just need to find the highest Value against 'A1' but also return all three columns i.e. the highest value of Item 'A1' = 350 and is also recorded against ID '2' so return the three columns with the data:

    Item 'A1'
    ID '2'
    Value '350'

    Only one Item will ever appear in the results
    More than one of the same ID can be aligned to different Items

    thanks,

  7. #7
    Registered User
    Join Date
    06-10-2010
    Location
    Berkshire, England
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    67

    Re: Return Value Of The Columns Based Upon Highest Value In Another

    Just wondering if anyone else has been able to look at this conundrum?

  8. #8
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: Return Value Of The Columns Based Upon Highest Value In Another

    I'm not sure that this is what you need, but maybe I guessed right.
    F2:
    =INDEX($B$2:$B$30,MATCH(1,INDEX((COUNTIF($F$1:F1,$B$2:$B$30)=0)*($B$2:$B$30>0),),))
    H2:
    =AGGREGATE(14,6,$C$2:$C$32/(MATCH(A$2:A$32&B$2:B$32,A$2:A$32&B$2:B$32,)=ROW(A$2:A$32)-1)/(B$2:B$32=F2),1)
    G2:
    =INDEX($A$2:$A$30,MATCH(1,INDEX(($B$2:$B$30=F2)*(H2=$C$2:$C$30),),))
    Attached Files Attached Files
    Last edited by T.I.; 08-06-2021 at 08:10 PM.

+ 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. Replies: 4
    Last Post: 05-16-2016, 06:50 PM
  2. [SOLVED] Max formula to return total of highest, second highest and third highest value
    By JonWilf in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-06-2016, 08:20 AM
  3. [SOLVED] Return value based on highest ranked result within range
    By nebbo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-07-2016, 05:04 PM
  4. [SOLVED] IF statement to return string based on highest value in range of columns
    By SeskaLien in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-15-2015, 10:10 PM
  5. Return Name based on highest POINTS but REWARD should be more than 10
    By siobeh in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 06-02-2015, 03:24 PM
  6. Replies: 8
    Last Post: 01-26-2012, 12:08 PM
  7. Return based on highest number in row
    By jillteresa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2009, 01:43 PM

Tags for this Thread

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