+ Reply to Thread
Results 1 to 5 of 5

AverageIF formulas - How can the same be done but for MAXIF or MINIF?

  1. #1
    Registered User
    Join Date
    03-06-2015
    Location
    UK
    MS-Off Ver
    2011
    Posts
    9

    AverageIF formulas - How can the same be done but for MAXIF or MINIF?

    MAXIF or MINIF formulas don't seem to be a thing on excel?

    I basically have a set of data that looks like this:

    rWsH4M1.png

    Now, I have used a COUNTIF formula to count the number of entires for each day. I have also done a AVERAGEIF statement to take the average 'downtime' for a particular day.

    However, is there a way I can make a formula that will find the max or min value of downtime for a given day?

    If it helps at all the formula I'm using for my averageif is this:


    PHP Code: 
    =AVERAGEIF($A$2:$A$5997,Q2,$C$2:$C$5997
    Where the dates for all my data points are in column A, the downtimes are in column C, and in column Q I basically have a column of dates starting at the earliest date in my dataset and then going up by 1 day for each row.

    Sorry if I haven't explained this well - please ask if you'd like me to clarify anything. I'd hugely appreciate any help anyone can give!

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: AverageIF formulas - How can the same be done but for MAXIF or MINIF?

    There is no built in Maxif or Minif functions..

    but you can do it with an array formula like
    =MAX(IF($A$2:$A$5997=Q2,$C$2:$C$5997))

    And

    =MIN(IF($A$2:$A$5997=Q2,$C$2:$C$5997))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: AverageIF formulas - How can the same be done but for MAXIF or MINIF?

    It can be problematic with the MIN formula if there are blanks in the range $C$2:$C$5997.
    Blanks will be considered Zero, and the formula would return 0 as the minimum value.

    So you'd have to add a criteria to test for NOT Blank
    =MIN(IF($A$2:$A$5997=Q2,IF($C$2:$C$5997<>"",$C$2:$C$5997)))

  4. #4
    Registered User
    Join Date
    03-06-2015
    Location
    UK
    MS-Off Ver
    2011
    Posts
    9

    Re: AverageIF formulas - How can the same be done but for MAXIF or MINIF?

    Quote Originally Posted by Jonmo1 View Post
    It can be problematic with the MIN formula if there are blanks in the range $C$2:$C$5997.
    Blanks will be considered Zero, and the formula would return 0 as the minimum value.

    So you'd have to add a criteria to test for NOT Blank
    =MIN(IF($A$2:$A$5997=Q2,IF($C$2:$C$5997<>"",$C$2:$C$5997)))
    Works perfectly - thank you so much!

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: AverageIF formulas - How can the same be done but for MAXIF or MINIF?

    You're welcome.

+ 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. Excel 2010 - MaxIF and MinIF formulas
    By plannerg in forum Excel General
    Replies: 3
    Last Post: 11-13-2012, 01:54 AM
  2. Replies: 2
    Last Post: 08-07-2012, 07:59 PM
  3. maxif, minif functions
    By firefly2k8 in forum Excel General
    Replies: 3
    Last Post: 10-21-2010, 01:29 PM
  4. Minif / Maxif ?
    By Thrain in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-01-2005, 06:20 AM
  5. MINIF /MAXIF Or something similar
    By kraljb in forum Excel General
    Replies: 6
    Last Post: 11-11-2005, 07:10 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