+ Reply to Thread
Results 1 to 14 of 14

Google Sheets: Ignore Errors and Calculate Average

  1. #1
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Google Sheets: Ignore Errors and Calculate Average

    Hi All,

    I have formula that pulls data from multiple sheets and It provides numbers and errors values. I am looking the formula that will ignore the errors and calculate the average. Here's my formula

    =AVERAGEIFS(A!B1:B2,A!A1:A2,Data!A1)+AVERAGEIFS(B!B1:B2,B!A1:A2,Data!A1)+AVERAGEIFS('C'!B1:B2,'C'!A1:A2,Data!A1)

    Output:

    =#DIV/0!+0+100

    I would like to calculate the average for above mentioned values.

    Expected Output

    50

    Please do the needful. Thanks in advance!
    Attached Files Attached Files
    Last edited by Manikandan Arumugam; 06-02-2020 at 02:23 AM.
    Manikandan Arumugam
    Excel Learner

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,826

    Re: Ignore Errors and Calculate Average

    Office 2010 does not have AVERAGEIFS, so you need to update your forum profile, please.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Ignore Errors and Calculate Average

    If there are no numbers in a range, any AVERAGE function will return #DIV/0!. If there are no numbers in all 3 ranges, I'd argue you should produce #DIV/0!. As long as there's one or more number in any of the ranges, try

    [CORRECTION]

    =SUM(SUMIFS(A!B1:B2,A!A1:A2,Data!A1,A!B1:B2,{"<0";">0"})+SUMIFS(B!B1:B2,B!A1:A2,Data!A1,B!B1:B2,{"<0";">0"})+SUMIFS('C'!B1:B2,'C'!A1:A2,Data!A1,'C'!B1:B2,{"<0";">0"}))
    /SUM(COUNTIFS(A!A1:A2,Data!A1)+COUNTIFS(B!A1:A2,Data!A1)+COUNTIFS(C'!A1:A2,Data!A1))

    Sorry. Sloppy job of copy/paste without enough editing.
    Last edited by hrlngrv; 06-07-2020 at 12:39 AM.

  4. #4
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Re: Ignore Errors and Calculate Average

    Thanks for your time, Mate. It shows me error on this argument "COUNTIFS(A!B1:B2,A!A1:A2,Data!A1)". Can you please help me
    Last edited by AliGW; 06-02-2020 at 02:29 AM. Reason: Please don't quote unnecessarily!

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,826

    Re: Ignore Errors and Calculate Average

    How are you using AVRAGEIFS in Excel 2013?

  6. #6
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Re: Ignore Errors and Calculate Average

    Hi Aligw,

    I am using Excel Office 2013 only and it works. Confused of your replies. . Please help me with my query. Correct me if I am wrong

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,826

    Re: Ignore Errors and Calculate Average

    Please see here: https://support.office.com/en-gb/art...8-f7c5c3001690

    Excel 2013 is not listed.

    Only AVERAGEIF is available in Excel 2013:

    https://support.office.com/en-gb/art...9-f5576d8ac642

  8. #8
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Re: Ignore Errors and Calculate Average

    Hi Aligw,

    Ya in microsoft website i could not able to see it. But i could see that its available in another website. As i said it works well for me.

    Attachment 680541

    =average(#DiV/0!,0,100)

    How to ignore error from this and calculates average? plz help me

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,826

    Re: Ignore Errors and Calculate Average

    Ah - thanks for clarifying.

    The problem you have is that any part of the formula that returns an error will mess up the formula. You need to decide how you want errors handling. Converting them to 0 isn't desirable, because it will mess up your averages, and returning text will generate a #VALUE! error.

    So, to be honest, you have a bit more thinking to do. How many sheets do you need to test? Will it only ever be three?

  10. #10
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Re: Ignore Errors and Calculate Average

    Hi Aligw,

    Thanks for your time. I have around 22 sheets. Actually I have found Aggregate formula which will skip error values. But I could not able to use that in G Drive.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,826

    Re: Ignore Errors and Calculate Average

    So are you now saying this is for Google Sheets???

  12. #12
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Re: Ignore Errors and Calculate Average

    Yes, Algiw

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,826

    Re: Ignore Errors and Calculate Average

    OK - so, you posted to the wrong part of the forum and failed to mention this caveat until post #10.

    I will move this thread and update your thread title for clarity (and so as not to waste time).

  14. #14
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Ignore Errors and Calculate Average

    Dunno if this is still open, but I corrected my response above.

+ 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. Average weekday revenue (Google Sheets)
    By djarcadian in forum Excel General
    Replies: 5
    Last Post: 08-07-2014, 05:00 PM
  2. Average Ignore Zeros, with a buttload of commas, errors
    By moosemoosemoose in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-02-2013, 04:06 PM
  3. Replies: 14
    Last Post: 06-14-2013, 09:00 PM
  4. [SOLVED] AVERAGE formula & ignore errors
    By SChapman in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-29-2013, 02:26 PM
  5. Ignore errors when calculation average of multiple ranges
    By joshkraemer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-13-2006, 06:30 PM
  6. How do I ignore cells with errors when calculating an average?
    By M Enfroy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-01-2005, 04:09 PM
  7. Replies: 2
    Last Post: 09-06-2005, 10:05 AM

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