+ Reply to Thread
Results 1 to 6 of 6

MAX IF Formula

  1. #1
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2007 & 2013
    Posts
    268

    MAX IF Formula

    Hello,

    Is there any MAX IF formula?

    For example, lets say I want to find the max value of range I2:I50, but just in case the following criteria matches: A2:A50="2013" and B2:B50="3" and C2:C50="TOTAL"?

    Thanks!

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

    Re: MAX IF Formula

    You have to construct an array* formula for it, like this:

    =MAX(IF((A2:A50=2013)*(B2:B50=3)*(C2:C50="TOTAL"),I2:I50))

    I've assumed that your numbers are proper numbers and not text values, so I've removed the " from around them. Note that each comparison is within its own brackets, and each term is ANDed together using the * symbol, although there are other ways of writing this using multiple-IFs.

    *Note that an array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE), instead of the usual <Enter>. If you do this correctly then Excel will wrap curly braces { } around the formula when viewed in the formula bar, but you must not type these yourself. If you need to amend the formula then you will need to use CSE again. An array formula can be copied to other cells in the usual way(s).

    Hope this helps.

    Pete

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: MAX IF Formula

    Array formula

    =MAX(IF((A2:A50=2013)*(B2:B50=3)*(C2:C50="TOTAL"),I2:I50))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: MAX IF Formula

    Try this array formula**:

    =MAX(IF(A2:A50=2013,IF(B2:B50=3,IF(C2:C50="TOTAL",I2:I50))))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Contributor
    Join Date
    04-02-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2007 & 2013
    Posts
    268

    Re: MAX IF Formula

    Thanks everyone! It worked great!

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: MAX IF Formula

    You're welcome. We appreciate the feedback!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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