+ 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
    MS Office Professional Plus (2016)
    Posts
    16

    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
    2010
    Posts
    3,899

    Re: Average IF returns #DIV/0! error

    Try

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

    C+S+E

  3. #3
    Forum Guru Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Northern Ireland
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    24,318

    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



  4. #4
    Registered User
    Join Date
    09-23-2017
    Location
    Toronto, ON
    MS-Off Ver
    MS Office Professional Plus (2016)
    Posts
    16

    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
    11,566

    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
    MS Office Professional Plus (2016)
    Posts
    16

    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)

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