+ Reply to Thread
Results 1 to 7 of 7

Average ignore #DIV/0! error

  1. #1
    Registered User
    Join Date
    10-26-2006
    Posts
    38

    Average ignore #DIV/0! error

    good day i should know this formula but for some reason i can't remember. need to average some cells but ignore the dreaded #div error

    ex

    A25 is 25
    A50 is 30
    A75 is #div/0!
    A100 is 30

    so i need to get the average of those but ignore the #div/0!

    those cells are a result of an average of a range (a1:a25 etc) so the formula could also be in that range as long as the formula the get the overall average doesn't count in any 0's.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    It's not normally a good idea to average averages, you probably won't get the same result as you would if you averaged the original data (because you're not necessarily giving each individual value equal weight).

    The solution, therefore is to average the original data range, e.g.

    =AVERAGE(A1:A100)

    If this might give an error change to

    =IF(COUNT(A1:A100),AVERAGE(A1:A100),"")

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    The best thing is to avoid the error in the first place with a something like an if statement....if denominator =0, then 0 or blank...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    10-26-2006
    Posts
    38
    Quote Originally Posted by daddylonglegs
    It's not normally a good idea to average averages, you probably won't get the same result as you would if you averaged the original data (because you're not necessarily giving each individual value equal weight).

    The solution, therefore is to average the original data range, e.g.

    =AVERAGE(A1:A100)

    If this might give an error change to

    =IF(COUNT(A1:A100),AVERAGE(A1:A100),"")
    you know that saying "all things being equal the simplest answer is usually the correct one" well this is one of those times. good ole simple average did the trick. thx!

  5. #5
    Registered User
    Join Date
    01-02-2008
    Posts
    4
    I do it with the IF function like this:

    =IF(SUM(A1:A100)=0,0,AVERAGE(A1:A100))

  6. #6
    Registered User
    Join Date
    10-26-2011
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Average ignore #DIV/0! error

    Try

    =AVERAGEIF(A1:A100,"<>#DIV/0!")
    Last edited by romperstomper; 10-26-2011 at 05:48 AM.

  7. #7
    Forum Contributor
    Join Date
    06-20-2016
    Location
    Los Angeles/Thailand
    MS-Off Ver
    2016
    Posts
    250

    Re: Average ignore #DIV/0! error

    Quote Originally Posted by dom_econ View Post
    Try

    =AVERAGEIF(A1:A100,"<>#DIV/0!")
    It worked thanks!

+ 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