+ Reply to Thread
Results 1 to 7 of 7

Average IF returns #DIV/0! error

  1. #1
    Registered User
    Join Date
    09-23-2017
    Location
    Toronto, ON
    MS-Off Ver
    Microsoft Office 365 Subscription MSO (Version 2310 Build 16.0.1
    Posts
    52

    Average IF returns #DIV/0! error

    Hi Community Members...

    In C5 I want to average the only negative numbers
    if its entered in B9:B29. If there is no negative number C5 should be blank or "No data" message.

    I used =AVERAGE(IF(B9:B29<0,B9:B29," ")), but it returns a #DIV/0! error.

    I have looked at Excel Help but could not work....

    All help much appreciated and I thank all for their
    help and time with my inquiry.

    Best Regards.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Average IF returns #DIV/0! error

    Try

    =IFERROR(AVERAGE(IF(B9:B29<0,B9:B29,"")),"")

    C+S+E

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Average IF returns #DIV/0! error

    ??? or even

    =IFERROR(AVERAGEIF(B9:B29,"<0",B9:B29),"")

    entered normally. You can use a similar formula using SUMIF and COUNTIF rather than SUM(IF... and COUNT(IF....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    09-23-2017
    Location
    Toronto, ON
    MS-Off Ver
    Microsoft Office 365 Subscription MSO (Version 2310 Build 16.0.1
    Posts
    52

    Re: Average IF returns #DIV/0! error

    It doesn't work with negative entries. Cell left blank.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Average IF returns #DIV/0! error

    I opened your file from post #4, selected C5, pressed F2 (to enter edit mode), then pressed ctrl-shift-enter to array enter the formula, and it returned the value -20.25. It looks to me like you did not array enter the formula, which is why it returned the error. Is that the problem, or is there more to the question?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    09-23-2017
    Location
    Toronto, ON
    MS-Off Ver
    Microsoft Office 365 Subscription MSO (Version 2310 Build 16.0.1
    Posts
    52

    Re: Average IF returns #DIV/0! error

    Excellent.. I got it..

    Thanks everyone here for kind help.

  7. #7
    Registered User
    Join Date
    01-04-2019
    Location
    Tennessee
    MS-Off Ver
    365
    Posts
    1

    Re: Average IF returns #DIV/0! error

    Quote Originally Posted by Glenn Kennedy View Post
    ??? or even

    =IFERROR(AVERAGEIF(B9:B29,"<0",B9:B29),"")

    entered normally. You can use a similar formula using SUMIF and COUNTIF rather than SUM(IF... and COUNT(IF....
    This formula worked! The help built in to the Excel app was useless. THANKS!!!!

+ 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] AVERAGE function returns #DIV/0! error
    By KhaVu in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-13-2019, 12:09 PM
  2. Replies: 1
    Last Post: 07-18-2018, 10:29 PM
  3. [SOLVED] Index, Match formula returns #NA error if result is from an average formula.
    By billrogers184 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-28-2016, 11:43 AM
  4. "Average" Formula Returns #DIV/0 error
    By TylerJamison in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-21-2014, 03:04 AM
  5. Calculating Average Annual Returns from a Series of Annual Returns
    By Bruinsfan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-03-2012, 09:50 PM
  6. AVERAGE help, using it on formula returns.
    By PhoenixJR in forum Excel General
    Replies: 9
    Last Post: 01-24-2012, 05:51 AM
  7. Average from Vlookup returns
    By edmdas in forum Excel General
    Replies: 9
    Last Post: 03-11-2009, 11:52 AM

Tags for this Thread

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