+ Reply to Thread
Results 1 to 10 of 10

Average a range while omitting a row because of a certain criteria

  1. #1
    Registered User
    Join Date
    03-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Average a range while omitting a row because of a certain criteria

    Here is the problem
    i am doing a report card and i need to average column c if column b and column a match or dont match

    a b c
    name grade score

    pat 7 100
    fred 7 90
    tom 7 80
    mike 7 95
    luke 6 100
    joe 6 90
    larry 6 85
    sue 5 95
    tom 5 93


    how do i write the formula to average grade seven and omit pat to get my class average (without pat)

    the report card cell for the class averge is "H5" (the formula would go here)
    the name to omit is in cell "H6"
    the grade the student is in is in "H7"

    =averageifs(C3:C11,B3:B11,H7,A3:A11,"<>H6") this does not work!!

    what am i doing wrong

    please help!!!

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Average a range while omitting a row because of a certain criteria

    You have the cell range for H6 inside the double quotes. It must be outside the quotes like this:

    =AVERAGEIFS(C3:C11,B3:B11,H7,A3:A11,"<>"&H6)

    You were VERY close

  3. #3
    Registered User
    Join Date
    03-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Average a range while omitting a row because of a certain criteria

    Quote Originally Posted by RudiS View Post
    You have the cell range for H6 inside the double quotes. It must be outside the quotes like this:

    =AVERAGEIFS(C3:C11,B3:B11,H7,A3:A11,"<>"&H6)

    You were VERY close


    this is still not working
    all im trying to do is averaging all grades in class 7 omitting pat
    because i want the averages of the other students in the class

    name grade score
    pat 7 100
    fred 7 90 92.5?????
    tom 7 80 pat
    mike 7 95 7
    luke 6 100
    joe 6 90
    larry 6 85
    sue 5 95
    tom 5 93


    how do i write the formula to average grade seven and omit pat to get my class average (without pat)

    the report card cell for the class averge is "H5" (the formula would go here)
    the name to omit is in cell "H6"
    the grade the student is in is in "H7"

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Average a range while omitting a row because of a certain criteria

    =AVERAGEIFS(C3:C11,B3:B11,H7,A3:A11,"<>"&H6) works just fine gives average of 88.33333333
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Average a range while omitting a row because of a certain criteria

    See the attached workbook. As far as I can see, it is accurate.

    AverageIF.xlsx

  6. #6
    Registered User
    Join Date
    03-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Average a range while omitting a row because of a certain criteria

    you are correct! thanks it works on this sheet

    but now im trying to make it work in a workbook with multiple pages
    which means transferring data from page 1 to page 2
    how can i send this workbook here so you can help me here
    can i attach it somehow and bring it in here?
    im new at this

  7. #7
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Average a range while omitting a row because of a certain criteria

    You can upload your file to the post you create.
    To do this, first click on the button called: Go Advanced on the bottom right corner where you reply to this post.
    When the advanced post window opens, type your message and then click the button I indicate in the attached image.
    When you have browse and loaded the image, you can add it to your message using the Add Inline button or from the attachment dropdown.

    1.jpg

    2.jpg

  8. #8
    Registered User
    Join Date
    03-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Average a range while omitting a row because of a certain criteria

    Ok i works

    i was trying to do it on a different worksheet
    i could not make that work but if i do it on the same one that the
    info is on i can make it work
    than i just link the cell

    maybe i should have used the insert array function or something to do it all in one cell

    dont know how

    thank you so much

  9. #9
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Average a range while omitting a row because of a certain criteria

    Excellent...

    Here is an example over two sheets

    AverageIF2.xlsx

  10. #10
    Registered User
    Join Date
    03-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Average a range while omitting a row because of a certain criteria

    Hey it works!!
    thanks so much for your help

    you saved the day!!!!

+ 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. Average a range based on criteria
    By D_N_L in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-14-2012, 07:15 AM
  2. average forumula omitting 0
    By CommonCents in forum Excel General
    Replies: 7
    Last Post: 02-04-2011, 12:35 PM
  3. Omitting blank cells in an average fomula
    By fireguy7 in forum Excel General
    Replies: 1
    Last Post: 10-13-2009, 06:31 PM
  4. calculating the AVERAGE of a column omitting cells = 0?
    By cosmicgrooves in forum Excel General
    Replies: 4
    Last Post: 11-29-2007, 12:25 AM
  5. [SOLVED] average cells omitting nulls
    By average-gal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2005, 05:06 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