+ Reply to Thread
Results 1 to 7 of 7

Bottom-Up Match of MIN value, Multiple Criteria

  1. #1
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Bottom-Up Match of MIN value, Multiple Criteria

    Hi --

    I'm hoping to return the row number (in range) of the LAST occurrence of the MIN value of a range of numbers that satisfy a criteria.
    I've attached a sample workbook which I hope helps explain further (see groups 1 & 4).

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Bottom-Up Match of MIN value, Multiple Criteria

    Give this formula a try. In G5, enter =SUMPRODUCT(MAX(ROW($C$5:$C$164)*($C$5:$C$164=MINIFS($C$5:$C$164,$D$5:$D$164,D5)))) and fill the formula.

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

    Re: Bottom-Up Match of MIN value, Multiple Criteria

    You can use this array* formula in G5:

    =IF(ISTEXT(D5),"",MAX(IF($C$5:$C$164=MIN(IF($D$5:$D$164=D5,$C$5:$C$164)),ROW($C$5:$C$164))))

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

    Then you can copy the formula down.

    Hope this helps.

    Pete

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Bottom-Up Match of MIN value, Multiple Criteria

    As 1st: do you want to row number OR number from No. column? According to your manually entered figures number from No. column.
    2nd: I do not know why you've marked last occurrence of MIN on No. 23 if MIN for group 1 appears only once in No. 13, so 1st and last occurrence is the same.
    Anyway, put into G5:

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

    and drag it down.
    Only for group 4, I think there is 2 occurrences of MIN.

    Capture.PNG
    Attached Files Attached Files
    Last edited by KOKOSEK; 08-11-2021 at 05:39 AM.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Bottom-Up Match of MIN value, Multiple Criteria

    Please try

    Top down
    =IF(N(D5),INDEX(SORT(FILTER($B$5:$C$164,$D$5:$D$164=D5),2),1,1),"--")


    BOTTOM UP
    =IF(N(D5),INDEX(SORT(FILTER($B$5:$C$164,$D$5:$D$164=D5),{2,1},{1,-1}),1,1),"--")
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Bottom-Up Match of MIN value, Multiple Criteria

    Thank all!!

    The various solutions worked!
    Last edited by xtinct2; 08-11-2021 at 06:52 AM.

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

    Re: Bottom-Up Match of MIN value, Multiple Criteria

    Glad to hear that, and thanks for marking the thread as Solved.

    You might also like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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] INDEX,MATCH from bottom up with multi-criteria
    By MannStewart in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-28-2021, 10:04 AM
  2. Replies: 3
    Last Post: 09-10-2020, 10:52 PM
  3. Need median of bottom 20% of values with multiple criteria
    By Carscampbell in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2020, 02:49 AM
  4. index match for multiple criteria with one criteria being does not match
    By Mr Stern 2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-17-2019, 08:16 AM
  5. Top/bottom items based on multiple criteria
    By G.Bregvadze in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-11-2019, 04:34 AM
  6. [SOLVED] SUMPRODUCT Multiple criteria top/bottom n values
    By jollygreengiant in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-07-2015, 10:57 AM
  7. Replies: 5
    Last Post: 02-04-2013, 12:32 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