+ Reply to Thread
Results 1 to 6 of 6

AVERAGEIF without counting zero's

  1. #1
    Registered User
    Join Date
    08-24-2011
    Location
    Pensacola, Florida
    MS-Off Ver
    Excel 2010
    Posts
    7

    AVERAGEIF without counting zero's

    I'm trying to average a value in b2 plus a different sheet (bills) c2:ab2 and not average in cells that contain a zero. Here is how I have the formula:
    =averageif(b2,bills!c2:ab2,"<>0") what I get is a dialog box saying error in formula and it highlights b2 in the formula. If I remove b2 from the formula it works.
    =averageif(bills!c2:ab2,"<>0") . Any idea on whats going on?

    jim
    Last edited by jlr4; 08-25-2011 at 10:52 AM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: AVERAGEIF without counting zero's

    Yeah, the first form is wrong, the second is correct.

    How can you average a value, you average an array.

  3. #3
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: AVERAGEIF without counting zero's

    Hi Jim,

    Does this work for you?

    Please Login or Register  to view this content.
    Hope that helps,

    Colin

    RAD Excel Blog

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: AVERAGEIF without counting zero's

    Maybe something like this:

    Please Login or Register  to view this content.
    Warning: If there are cells that are empy then the formula will give you the wrong result.

    abousetta

  5. #5
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: AVERAGEIF without counting zero's

    I would go with Colin's approach. Works regardless of whether there are blank cells or not.

    abousetta

  6. #6
    Registered User
    Join Date
    08-24-2011
    Location
    Pensacola, Florida
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: AVERAGEIF without counting zero's

    Thanks everyone, I used Colin's approach and it worked perfect. I spent many hours trying to figure this out, don't know why I was so stuck on AVERAGEIF. I didn't get to abousetta's reply but I will.

    Best regards
    jim

+ 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