+ Reply to Thread
Results 1 to 6 of 6

MIN and MAX like an AVERAGEIFS?

  1. #1
    Registered User
    Join Date
    04-10-2012
    Location
    Illinois,USA
    MS-Off Ver
    Excel 2008
    Posts
    7

    Angry MIN and MAX like an AVERAGEIFS?

    =AVERAGEIFS(D10:D107,M10:M107,">1")

    this formula uses the cells in column D to calculate the average (but only if their corresponding cell in M is greater than 1).

    using this same test logic, how do I calculate the minimum and maximum of the cells in column D (but only if their corresponding cell in M is greater than 1?

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,605

    Re: MIN and MAX like an AVERAGEIFS?

    Try: =MAX(IF(M10:M107>1, D10:D107))
    confirmed with ctrl+shift+enter (not just enter)

    Same for a MIN

  3. #3
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: MIN and MAX like an AVERAGEIFS?

    Something along the lines of:

    =MAX(INDEX(D10:D107*(M10:M107>1),0))

    The minimum is trickier:

    =MIN(INDEX(D10:D107+((M10:M107<=1)*9999999),0))

  4. #4
    Registered User
    Join Date
    04-10-2012
    Location
    Illinois,USA
    MS-Off Ver
    Excel 2008
    Posts
    7

    Re: MIN and MAX like an AVERAGEIFS?

    zbor...urock.
    just learning Excel formulas and this makes perfect sense.
    what's up with the ctrl+shift+enter???

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,605

    Re: MIN and MAX like an AVERAGEIFS?

    It's called array formula.
    An array formula is a formula that works with an array, or series, of data values rather than a single data value.

    To enter a formula as an array formula, type the formula in the cell and press the CTRL SHIFT and ENTER (CSE) keys at the same time rather then just ENTER. You must do this the first time you enter the formula and whenever you edit the formula later. If you do this properly, Excel will display the formula enclosed in curly braces { }. You do not type in the braces -- Excel will display them automatically. If you neglect to enter the formula with CTRL SHIFT ENTER, the formula may return a #VALUE error or return an incorrect result.

  6. #6
    Registered User
    Join Date
    04-10-2012
    Location
    Illinois,USA
    MS-Off Ver
    Excel 2008
    Posts
    7

    Re: MIN and MAX like an AVERAGEIFS?

    thanks for all the help.
    much appreciated.

+ 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