+ Reply to Thread
Results 1 to 6 of 6

#DIV/0 Error with IF and Average Formula

  1. #1
    Registered User
    Join Date
    01-13-2015
    Location
    Japan
    MS-Off Ver
    2013
    Posts
    77

    #DIV/0 Error with IF and Average Formula

    Hello

    I have one problem with this formula:

    =IF(COUNTA(L16, T16)=0,0,AVERAGE(L16,T16))

    It gives me a #DIV/0 error where I have text in both columns. In this case I'd like to see "N/A." How do I do that? (Where I have text in one column it works as I expect—no problem.) Thanks very much!

  2. #2
    Registered User
    Join Date
    01-23-2014
    Location
    Romania
    MS-Off Ver
    Excel 2016
    Posts
    54

    Re: #DIV/0 Error with IF and Average Formula

    =if(counta(a16, b16)=0,0,iferror(average(a16,b16),na()))

  3. #3
    Registered User
    Join Date
    01-23-2014
    Location
    Romania
    MS-Off Ver
    Excel 2016
    Posts
    54

    Re: #DIV/0 Error with IF and Average Formula

    sorry, i replaced your cell references :

    =IF(COUNTA(L16, T16)=0,0,IFERROR(AVERAGE(L16,T16),NA()))

  4. #4
    Registered User
    Join Date
    01-13-2015
    Location
    Japan
    MS-Off Ver
    2013
    Posts
    77

    Re: #DIV/0 Error with IF and Average Formula

    Thanks, T. That almost works: instead of #DIV/0 error I now get #N/A. I need to make a small change, but I can't work out what.

  5. #5
    Registered User
    Join Date
    01-23-2014
    Location
    Romania
    MS-Off Ver
    Excel 2016
    Posts
    54

    Re: #DIV/0 Error with IF and Average Formula

    I thought that was your expected result...then, try like this:

    =IF(COUNTA(L16,T16)=0,0,IFERROR(AVERAGE(L16,T16),"NA"))

  6. #6
    Registered User
    Join Date
    01-13-2015
    Location
    Japan
    MS-Off Ver
    2013
    Posts
    77

    Re: #DIV/0 Error with IF and Average Formula

    That's just what I needed—thanks! (I get confused sometimes with parentheses.)

+ 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. Value error with average formula - Because of blank cells?
    By nobodyukno in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 07-17-2013, 08:40 PM
  2. [SOLVED] #NUM error when trying to average cells that also contain a formula
    By sam beginer in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-22-2013, 11:13 AM
  3. Average formula excluding DIV error
    By candaceroe in forum Excel General
    Replies: 2
    Last Post: 11-04-2011, 11:52 AM
  4. Average formula - #DIV/0! error
    By scribble00 in forum Excel General
    Replies: 2
    Last Post: 06-09-2009, 09:04 PM
  5. Average Formula error #DIV/0!
    By amkoolz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-15-2005, 06:13 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