+ Reply to Thread
Results 1 to 5 of 5

How to AVERAGEIF with positive, negative and zeroes?

  1. #1
    Registered User
    Join Date
    10-20-2012
    Location
    calif
    MS-Off Ver
    Excel 2007
    Posts
    19

    How to AVERAGEIF with positive, negative and zeroes?

    I have a column of data that includes positive numbers, negative numbers and zeroes. I tried =AVERAGEIF(AO2:AO52,"<>0") and =AVERAGEIF(AO2:AO52,"<>0",AO2:AO52)but I get a divide by zero error. If I do =AVERAGEIF(AO2:AO52,">0") I get an average of the positive numbers, and if I do =AVERAGEIF(AO2:AO52,"<0") I get an average of all the negative numbers, but I cant seem to get an average of ALL of the numbers (excluding the zeroes). Does anyone have an idea how to make this work in Excel 2007? Thanks!
    Last edited by innatedoc; 10-20-2012 at 09:09 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: How to AVERAGEIF with positive, negative and zeroes?

    i just tried what i think you want, and it worked fine. i entered this
    1
    2
    3
    4
    1
    0
    1
    4
    0
    7
    4
    -1
    -2
    -3
    -6
    =AVERAGEIF(A1:A15,">0") =3
    =AVERAGEIF(A1:A15,"<0") = -3
    =AVERAGEIF(A1:A15,"<>0") = 1.15384615384615

    maybe upload a sample workbook for me to take a look at?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to AVERAGEIF with positive, negative and zeroes?

    Hi

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    seems to work just fine.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    10-20-2012
    Location
    calif
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: How to AVERAGEIF with positive, negative and zeroes?

    Thank you. I fingered it out - I had divided by zero errors in the column I was attempting to average. I changed the formula in those columns to show a blank result instead of a divide by zero error and now the AVERAGEIF(AO2:AO52,"<>0") command works just fine.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: How to AVERAGEIF with positive, negative and zeroes?

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neet and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

+ 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