+ Reply to Thread
Results 1 to 9 of 9

How to calculate average, minimum and maximum if criteria in former column is met.

  1. #1
    Registered User
    Join Date
    06-24-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel MAC 2011
    Posts
    3

    How to calculate average, minimum and maximum if criteria in former column is met.

    Hi,

    I'm trying to calculate the average, minimum and maximum number of each different theme in column B. Please see the attached workbook file.

    Example_Count .xlsx

    Schermafbeelding 2012-06-24 om 22.30.32.png

    Could someone help me with the correct formula's? Thank you!

    Kind regards,
    Hans

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How to calculate average, minimum and maximum if criteria in former column is met.

    Hi Hans & Welcome to the Forum,

    F3 =IFERROR(AVERAGEIF($B$3:$B$32,E3,$C$3:$C$32),"")

    Array Entered (Ctrl + Shift + Enter)
    G3 =IF(F3<>"",MIN(IF($B$3:$B$32=E3,$C$3:$C$32)),"")
    H3 =IF(F3<>"",MAX(IF($B$3:$B$32=E3,$C$3:$C$32)),"")
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    06-24-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel MAC 2011
    Posts
    3

    Re: How to calculate average, minimum and maximum if criteria in former column is met.

    Hi Jeff, thanks for the fast reply.

    I know i'm doing something wrong.. When entering the formula (=IFERROR(AVERAGEIF($B$3:$B$32,E3,$C$3:$C$32),"")) in F3 and then Entering, i see it as text. When entering for instance a 1 between the "" i get a prompt: The formula contains an error.

    Am i doing something wrong?

    Thanks!
    Hans

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How to calculate average, minimum and maximum if criteria in former column is met.

    Hi Hans,

    When you say you see text, do you mean you see the formula and not a number?

    If this is the case, for some reason the cell is only recognizing itself as text.

    Do this, on that cell >> Ctrl + H
    Find what: =
    Replace with: =

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to calculate average, minimum and maximum if criteria in former column is met.

    If, in F3, you are seeing this: (=IFERROR(AVERAGEIF($B$3:$B$32,E3,$C$3:$C$32),""))
    You have enclosed the entire formula (including the equals sign) within brackets. Remove the outermost set of brackets.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How to calculate average, minimum and maximum if criteria in former column is met.

    @Cutter,

    Thanks I missed that part

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to calculate average, minimum and maximum if criteria in former column is met.

    The way post #3 is worded it's hard to tell. It could be taken as that's what's in F3 or OP was just specifying what formula was being used and enclosed the formula in brackets just to show it.

  8. #8
    Registered User
    Join Date
    06-24-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel MAC 2011
    Posts
    3

    Re: How to calculate average, minimum and maximum if criteria in former column is met.

    Hi all, Thanks for your replies.

    I entered in F3 as follows:

    =IFERROR(AVERAGEIF($B$3:$B$32,E3,$C$3:$C$32),"")

    Then i enter in G3:

    =IF(F3<>"",MIN(IF($B$3:$B$32=E3,$C$3:$C$32)),"")

    Then entered in H3:

    =IF(F3<>"",MAX(IF($B$3:$B$32=E3,$C$3:$C$32)),"")

    All cells then show the formula's as text.


    I tried the replacement of the "=" but got the "This formula is not correct" prompt immediately.

    Is is possible to add the formula's in the original excel and then upload it again. Then i can see what i am doing wrong.

    Boy, what a noob ej!


    Thanks a lot!

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,792

    Re: How to calculate average, minimum and maximum if criteria in former column is met.

    Hello Hans,

    If you are in Amsterdam then your regional settings probably require you to use semi-colons as separators in those formulas, rather than commas, e.g. for the first

    =IFERROR(AVERAGEIF($B$3:$B$32;E3;$C$3:$C$32);"")

    and the same for the other two - the last two are "array formulas" which means, on a Mac, you need to confirm with COMMAND+RETURN so that curly braces like { and } appear around the formulas
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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