+ Reply to Thread
Results 1 to 5 of 5

Adding up values after checking a column

  1. #1
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    346

    Adding up values after checking a column

    Evening,

    Hopefully my last problem if someone can help me out

    I'm using the formula

    =COUNTIF(INPUT!$H1:$H163,"<>"&B14)

    to count all the values in column H which are NOT B14.

    I now want to work out the average grade in column BK for those cells where the value in column H is not B14?

    I tried:

    =SUMPRODUCT((INPUT!H2:$H163,"<>"&B14)*INPUT!$BK$2:$BK$163)/COUNTIF(INPUT!H2:$H163,"<>"&B14)

    But it comes back with an error.

    Any ideas would be greatly appreciated

    Many thanks
    Last edited by Cmorgan; 11-04-2011 at 03:19 AM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Adding up values after checking a column

    Hi Cmorgan,

    In Excel 2007+ you can use AVERAGEIF (or AVERAGEIFS for multiple criteria). For example:

    =AVERAGEIF(INPUT!$H$2:$H$163,"<>"&B14,INPUT!$BK$2:$BK$163)

  3. #3
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Adding up values after checking a column

    Thanks for this, I'm using 2010.

    I've tried this and the figure comes in at 31.24, when it has to be a figure between 1-5. Any ideas?

    I appreciate the help.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Adding up values after checking a column

    I'd suggest uploading a copy of your workbook (less any sensitive data, e.g. names, addresses) so we can take a look.

    In the file, show what you expect the result to be and why you expect that.

  5. #5
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Adding up values after checking a column

    Apologies, must have been my brain was frazzled by Excel, the previous formula does work, I had just used an incorrect column.

    Thanks ever so much for your help!

+ 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