+ Reply to Thread
Results 1 to 2 of 2

Ignore #N/A in sumif and average if

  1. #1
    Registered User
    Join Date
    09-18-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    29

    Ignore #N/A in sumif and average if

    HI, can someone please help me ignore the #N/A cells, making them equal 0 when found, on the following formulas?

    For this one, the #N/A cells are in the G column;
    =SUMIF($B$2:$B$86,A89,$G$2:$G$86)

    For this one, the #N/A cells are in the H column;
    =AVERAGEIF($B$2:$B$86,A89,$H$2:$H$86)

    Thanks!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Ignore #N/A in sumif and average if

    You can use array formulas like these to ignore any errors in the sum/average ranges

    =SUM(IF($B$2:$B$86=A89,IF(ISNUMBER($G$2:$G$86),$G$2:$G$86)))

    =AVERAGE(IF($B$2:$B$86=A89,IF(ISNUMBER($H$2:$H$86),$H$2:$H$86)))

    In that latter formula it actually just ignores errors, if you really want to treat errors as zero then the result will be different because those zeroes will give you a different average, for that version you can use this slightly amended formula:

    =AVERAGE(IF($B$2:$B$86=A89,IF(ISNUMBER($H$2:$H$86),$H$2:$H$86,0)))

    all formulas need to be confirmed with CTRL+SHIFT+ENTER
    Audere est facere

+ 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. Formula for average & ignore zero
    By killerthun in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-10-2014, 01:33 PM
  2. Replies: 14
    Last Post: 06-14-2013, 09:00 PM
  3. Average but ignore if value = 0
    By Tom_J_W in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-17-2013, 11:35 PM
  4. Ignore NA in sumif
    By amartino44 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-04-2013, 08:40 PM
  5. Ignore values over an average.
    By samuelhorton in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-22-2008, 02:59 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