+ Reply to Thread
Results 1 to 5 of 5

I am trying to return a value based on the functions =match() and =index()

  1. #1
    Registered User
    Join Date
    11-14-2019
    Location
    Gaborone
    MS-Off Ver
    Office 365
    Posts
    2

    I am trying to return a value based on the functions =match() and =index()

    Hello

    I need assisttance i want excel to return the name associated with highest number meeting the condition that is greater than 0% and less than or equal to 20%. In the excel table attached the name i wish to be returned is Judith since its 19% the highest in the list but not over the target which is 20%.

    Find attached.
    Attached Files Attached Files
    Last edited by mboymosweu; 11-14-2019 at 08:49 AM. Reason: Request from admin

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: return the name associated with highest number meeting the conditions

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    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:I did it for you this time only using one of your own sentences

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: return the name associated with highest number meeting the conditions

    You can use this array* formula, say in cell D2:

    =INDEX(A2:A10,MATCH(MAX(IF(($B$2:$B$10 <= $B$1)*($B$2:$B$10 > 0),$B$2:$B$10)),$B$2:$B$10,0))

    * Note that an array formula needs to be confirmed using the key combination of Ctrl-Shift-Enter (CSE), instead of the usual Enter.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    11-14-2019
    Location
    Gaborone
    MS-Off Ver
    Office 365
    Posts
    2

    Re: I am trying to return a value based on the functions =match() and =index()

    Hi Pete

    Excel should return the maximum number which is greater than 0 but less than 20. which means 26, 30, 32, 16, 0,48,14 and 21 are out but the number which satisfied the query is 19 because its the heighest between the range 0-20. Hence the name that must be returned is Judith. Hope it makes sense.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: I am trying to return a value based on the functions =match() and =index()

    Pete's formula works for me, did you confirm it with Ctrl Shift Enter?

    Here's another formula that does not need the CSE
    =INDEX(A2:A10,AGGREGATE(15,6,(ROW(A2:A10)-ROW(A2)+1)/((B2:B10<=B1)*(B2:B10>0)),1))

+ 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. data set too big for use of INDEX fuction
    By yertleturtle in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-06-2014, 01:34 PM
  2. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  3. INDEX Fuction - Urgent Help Needed
    By rthomson91 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-12-2013, 08:52 AM
  4. Replies: 4
    Last Post: 12-27-2012, 06:18 PM
  5. IF fuction &Index
    By Shermaine2010 in forum Excel General
    Replies: 2
    Last Post: 08-31-2011, 10:46 PM
  6. Index & Match Fuction
    By caper in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-21-2008, 11:46 AM
  7. [SOLVED] Complicated lookup/match fuction
    By keysersoze in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-07-2005, 06: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