+ Reply to Thread
Results 1 to 12 of 12

Ignoring errors in DAVERAGE formula

  1. #1
    Registered User
    Join Date
    04-04-2014
    Location
    Calgary
    MS-Off Ver
    Excel 2010 Mac
    Posts
    8

    Ignoring errors in DAVERAGE formula

    Hello,

    I was wondering if anybody knows how to ignore errors when using DAVERAGE?

    Thanks for your help!

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Ignoring errors in DAVERAGE formula

    I never used DAVERAGE but can't this be accomplished with AVERAGEIF function?

    =AVERAGEIF(A2:A10,">0")

    A
    B
    1
    Table Average
    2
    25
    17.71
    3
    12
    4
    35
    5
    1
    6
    #NAME?
    7
    12
    8
    #DIV/0!
    9
    12
    10
    27
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    04-04-2014
    Location
    Calgary
    MS-Off Ver
    Excel 2010 Mac
    Posts
    8

    Re: Ignoring errors in DAVERAGE formula

    Hi There,

    I'm using 'DAVERAGE' because I am using another column as criteria to determine what values to average. So unfortunately this won't work.

    Thank you for your input though!

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Ignoring errors in DAVERAGE formula

    Well, without seeing your data the only thing I can offer is this link

    http://www.techonthenet.com/excel/formulas/daverage.php

  5. #5
    Registered User
    Join Date
    04-04-2014
    Location
    Calgary
    MS-Off Ver
    Excel 2010 Mac
    Posts
    8

    Re: Ignoring errors in DAVERAGE formula

    Example 1.xlsx

    Hi!

    Sorry, here is an attachment of my data. Please let me know if it didn't work. I would like average data from column G based on what year it was collected in. The averaged values are meant to be in columns N and O. It would be easy enough to just select which cells to average, however, I have 200 more tabs like this with differing amounts of 2013 and 2014 recordings so I would like to just make a macro to paste these new formulas in columns N and O and it calculate everything automatically regardless of errors.

    Ps. The errors have been introduced in the data because the Estimated Flowrate is graphed after and I need it to show a blank rather than a 0.

    Thank you for any help!

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Ignoring errors in DAVERAGE formula

    All you need is to add IFERROR to your formula in G.

    =IFERROR(IF(OR(F3="Overflow",F3="Emptied"),NA(),IF(OR(F2="Overflow",F2="Emptied"),(3.785*(F3-0))/(A3-A2),IF(OR(A3="",F3=""),NA(),IF(OR(F2=F3,A2=A3),0,(3.785*(F3-F2))/(A3-A2))))),"")

  7. #7
    Registered User
    Join Date
    04-04-2014
    Location
    Calgary
    MS-Off Ver
    Excel 2010 Mac
    Posts
    8

    Re: Ignoring errors in DAVERAGE formula

    But I need those errors in column G because in another spreadsheet I pull the data from column G and graph it and without the errors then my graph doesn't plot how I would like it to.

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Ignoring errors in DAVERAGE formula

    I see, ok,

    Try this for 2013

    =AVERAGEIFS(G2:G7,B2:B7,T2,G2:G7,">0")

    For 2014

    =AVERAGEIFS(G2:G7,B2:B7,U2,G2:G7,">0")

    adjust ranges as need it.

  9. #9
    Registered User
    Join Date
    04-04-2014
    Location
    Calgary
    MS-Off Ver
    Excel 2010 Mac
    Posts
    8

    Re: Ignoring errors in DAVERAGE formula

    Yes! That works... but I was just putting it into some of my other sheets and I've realized that I sometimes have negative numbers in column G! So that is going to screw up the ">0".... any way to get around that??

  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Ignoring errors in DAVERAGE formula

    No problem, just replace >0 with "<>#N/A"

  11. #11
    Registered User
    Join Date
    04-04-2014
    Location
    Calgary
    MS-Off Ver
    Excel 2010 Mac
    Posts
    8

    Re: Ignoring errors in DAVERAGE formula

    Oh right... I should have known that...

    Thank you so much for your help today. I really appreciate it. It works perfectly!!

  12. #12
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Ignoring errors in DAVERAGE formula

    You're welcome and thank you for the feedback!
    Last edited by AlKey; 06-10-2014 at 07:00 PM.

+ 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. [SOLVED] Ignoring errors
    By Cmorgan in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-16-2013, 05:05 AM
  2. Ignoring errors
    By Cmorgan in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-23-2011, 09:12 AM
  3. Ignoring Formula Errors Through VBA
    By justinharris in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-19-2011, 06:29 PM
  4. Replies: 1
    Last Post: 01-25-2011, 10:37 PM
  5. Ignoring errors
    By JSALDUTTI in forum Excel General
    Replies: 1
    Last Post: 12-02-2010, 04:45 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