+ Reply to Thread
Results 1 to 10 of 10

Second highest using maxifs

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Second highest using maxifs

    Hi,
    I am using maxifs with multiple criteria. It's really convenient in order to find the highest value.
    I wonder if there is any simple way to use maxifs to find the second highest value?
    Thanks
    Please * if you like the answer

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Second highest using maxifs

    You need to use LARGE function
    Formula: copy to clipboard
    =LARGE(A2:A11,2)

    v A B
    1
    2 65 125
    3 118
    4 9
    5 123
    6 4
    7 95
    8 127
    9 68
    10 125
    11 82
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: Second highest using maxifs

    It would be better to use AGGREGATE with LARGE

    Formula: copy to clipboard
    =AGGREGATE(14,6,A1:A10/(B1:B10="apple")/(C1:C10="banana"),2)


    the above illustrates how to return 2nd highest value from A1:A10 where corresponding value in Col B is "apple", and Col C is "banana"

    If you need more detailed assistance please provide your current MAXIFS calculation.

  4. #4
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: Second highest using maxifs

    I really hope the sample file would make my question more clear.
    Thank you
    Attached Files Attached Files

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

    Re: Second highest using maxifs

    Please try at J6

    =MAXIFS($F$2:$F$44,$B$2:$B$44,L6,$F$2:$F$44,"<"&K6)

  6. #6
    Registered User
    Join Date
    07-14-2020
    Location
    Sydney
    MS-Off Ver
    365
    Posts
    1

    Re: Second highest using maxifs

    Quote Originally Posted by Bo_Ry View Post
    Please try at J6

    =MAXIFS($F$2:$F$44,$B$2:$B$44,L6,$F$2:$F$44,"<"&K6)
    Fantastic! Thanks for this great little formula

  7. #7
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: Second highest using maxifs

    @Bo_Ry so elegant.. thank you very much

  8. #8
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,647

    Re: Second highest using maxifs

    =IF(COUNTIF(B$2:B$44;L6)>0;LARGE(IF(B$2:B$44=L6;F$2:F$44);2);"")
    Use this matrix formula
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  9. #9
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Second highest using maxifs

    Or
    For the lack of MAXIFS function you may use this regular formula:
    Enter in J6 and copy down
    Formula: copy to clipboard
    =MAX(INDEX((B$2:B$44=L6)*(F$2:F$44<K6)*(F$2:F$44),0))

  10. #10
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: Second highest using maxifs

    Thans guys, it's really good to know more than one way to solve a problem.. and here we got three.

    @Alkey, I was surprised to see that the formula is not an array forumula.. so it's really simple for those who are not familiar with the CTRL+ALT+ENTER..

+ 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] MAXIFS and MINIFS not available
    By TFiske in forum Excel General
    Replies: 7
    Last Post: 05-08-2019, 11:27 PM
  2. MAXIFS with OR criteria
    By HalPlz in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-06-2019, 03:24 AM
  3. [SOLVED] Use MAXIFS with a calcuated parameter
    By art3mis in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-04-2018, 06:31 PM
  4. MAXIFS with criteria
    By shiftyspina in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 01-25-2017, 10:14 AM
  5. Replies: 3
    Last Post: 06-09-2016, 12:51 PM
  6. [SOLVED] MaxIFs help
    By Hondahawkrider in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2016, 02:23 PM
  7. MaxIFS help
    By Hondahawkrider in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2016, 03:17 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