+ Reply to Thread
Results 1 to 13 of 13

INDEX and MATCH for the highest value in the list

  1. #1
    Registered User
    Join Date
    02-22-2019
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    72

    INDEX and MATCH for the highest value in the list

    Hi,

    Attached is a file were in sheet1 I want to do some kind of look up (VLOOKUP, LOOKUP, INDEX and MATCH) of the values in Sheet2 (column B) so when the match is found between column A1 Sheet1 and Calumn A in Sheet2 that it returns the highest value ( which is 90).
    I know I can use MAXIFS function to get the highest value. I can add that in column C Sheet2 and then do simple VLOOKUP from Sheet1 but can it be done all in one formula from Sheet1?

    Second question how do I do it if I want it to return next highest value which in this example is (ABC12345/1 = 20, ABC12345/2 = 15, ABC12345/3 =25).

    Regards
    Cuni
    Attached Files Attached Files
    Last edited by Cuni; 02-20-2020 at 07:46 AM.

  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,639

    Re: More advanced look up

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. YOu need to specify the nature of the lookup you want to do.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: More advanced look up

    Post deleted following Ali's comment
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    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,639

    Re: INDEX and MATCH for the highest value in the list

    Title now fine - thanks.

  5. #5
    Registered User
    Join Date
    02-22-2019
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    72

    Re: INDEX and MATCH for the highest value in the list

    Hi,

    I hope the new edited title is more precise now summarize my request better.

    BR
    Cuni

  6. #6
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: INDEX and MATCH for the highest value in the list

    Hi
    Try this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Change 1 to 2 for the second question.

  7. #7
    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,639

    Re: INDEX and MATCH for the highest value in the list

    Highest:

    =LARGE(IF(Sheet2!$A$2:$A$18=Sheet1!A2,Sheet2!$B$2:$B$18),1)

    Next highest:

    =LARGE(IF(Sheet2!$A$2:$A$18=Sheet1!A2,Sheet2!$B$2:$B$18),2)

    and so on. All array entered (CTRL+SHIFT+ENTER).

  8. #8
    Registered User
    Join Date
    02-22-2019
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    72

    Re: INDEX and MATCH for the highest value in the list

    Thank you for prompt reply and solution to my request!

  9. #9
    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,639

    Re: INDEX and MATCH for the highest value in the list

    You're welcome.

  10. #10
    Registered User
    Join Date
    02-22-2019
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    72

    Re: INDEX and MATCH for the highest value in the list

    Hi,

    Sorry I have to reopen the thread again. Aggregate function is new to me. It seems very useful and versatile...
    I'm trying to wrap my head around array: Sheet2!$B$2:$B$18/(Sheet1!A2=Sheet2!$A$2:$A$18)
    Area Sheet2!$B$2:$B$18 is divided by (Sheet1!A2=Sheet2!$A$2:$A$18) or? How can Excel still consider it to be array if so?
    Last edited by Cuni; 02-20-2020 at 10:50 AM.

  11. #11
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: INDEX and MATCH for the highest value in the list

    Hi

    When you perform Sheet1!A2=Sheet2!$A$2:$A$18 you get an array of values true or false. In a arithmetic operation true is converted in 1 and false in 0. So, in your example, Sheet2!$B$2:$B$18/(Sheet1!A2=Sheet2!$A$2:$A$18) is the same as
    {10;9;9;9;20;88;...;90} /("ABC12345/1"={"ABC12345/1";"ABC12345/1";"ABC12345/1";"ABC12345/1";"ABC12345/1";"ABC12345/1";"ABC12345/2";...;"ABC12345/3"})
    {10;9;9;9;20;88;...;90} / {1;1;1;1;1;1;0;...;0}
    which gives you the array ={10;9;9;9;20;88;#DIV/0!;...;#DIV/0!}.
    The error is forced to be ignored by aggregate function (with 14 as larger and 6 as ignore errors option) and so, only the values associated to the component Sheet1!A2 are taken to perform the operation.

    Sorry for my bad English but I hope this helps you to understand the question.
    Last edited by José Augusto; 02-20-2020 at 11:17 AM.

  12. #12
    Registered User
    Join Date
    02-22-2019
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    72

    Re: INDEX and MATCH for the highest value in the list

    Hi,

    There is nothing wrong with your English. Very well explained, thanks!
    I try to break down the function prior to my question to only Sheet1!A2=Sheet2!$A$2:$A$18 and could see that it gives gives true or false. Then this Sheet2!$B$2:$B$18/(Sheet1!A2=Sheet2!$A$2:$A$18).

    It's understandable. However I need to do this kind of array things more often to really nail it

  13. #13
    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,639

    Re: INDEX and MATCH for the highest value in the list

    Yes, you do - that is precisely how to master this type of formula.

    Please don't forget to mark this as solved.

+ 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. More advanced advanced filtering
    By Acceleracer in forum Excel General
    Replies: 2
    Last Post: 02-06-2014, 09:02 PM
  2. advanced filter - button to re apply advanced filter across multiple sheets
    By motmac87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2013, 11:16 PM
  3. Advanced Right
    By roly in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-10-2007, 07:25 AM
  4. Advanced IF-THEN... Help Please
    By Apoction in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2006, 02:37 PM
  5. Replies: 2
    Last Post: 07-21-2006, 10:05 AM
  6. advanced if?????
    By taran in forum Excel Formulas & Functions
    Replies: 50
    Last Post: 09-06-2005, 07:05 PM
  7. Advanced use of IF
    By Backdoor Cover in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 09-06-2005, 03:05 AM
  8. [SOLVED] advanced filter a range:Advanced Filter function
    By Il Principe in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10: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