+ Reply to Thread
Results 1 to 8 of 8

How to stop #Div/0! in formula result.

  1. #1
    Registered User
    Join Date
    09-23-2007
    Posts
    53

    How to stop #Div/0! in formula result.

    How would I add to this formula to stop the #Div/0! when there are no entries. Normally I would use =IFERROR but using the average function as well is confusing me.

    =AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales")

    Thanks

  2. #2
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Lima, Peru
    MS-Off Ver
    Office 365 ProPlus
    Posts
    148

    Re: How to stop #Div/0! in formula result.

    You can use:

    =IF(COUNT($C$12:$Z$12),AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales"),NA())

    It will return a #N/A error, instead of a #DIV/0! error, if you'd prefer no to show any error, replace NA() with "NO ENTRIES", or anything you like.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: How to stop #Div/0! in formula result.

    Did you try IFERROR(your formula,””)?
    You don’t say how you tried the iferror formula.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Contributor
    Join Date
    05-03-2010
    Location
    scotland,uk
    MS-Off Ver
    Excel 2007
    Posts
    186

    Re: How to stop #Div/0! in formula result.

    I tried putting it in at the beginning, from memory something like:

    IFERROR(=AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales"))

    LeoSkywalker:
    That didn't work still showing #Div/0
    Attached Images Attached Images

  5. #5
    Forum Contributor
    Join Date
    10-08-2018
    Location
    Lima, Peru
    MS-Off Ver
    Office 365 ProPlus
    Posts
    148

    Re: How to stop #Div/0! in formula result.

    If you want to use IFERROR:
    =IFERROR(AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales"),"xxxxxxx")

    For COUNT, it will work when there are no entries, however, it will fail if you have any ZEROES as entries.

  6. #6
    Forum Contributor
    Join Date
    05-03-2010
    Location
    scotland,uk
    MS-Off Ver
    Excel 2007
    Posts
    186

    Re: How to stop #Div/0! in formula result.

    OK I understand none of the columns have entries as yet so would be zeros.

    This is now working as I wanted and leaves the cell as a blank. thanks.
    =IFERROR(AVERAGEIFS($C$12:$Z$12,$C$12:$Z$12,"<>0",$C$4:$Z$4,"<>sales"),"")

    Thank you

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: How to stop #Div/0! in formula result.

    I have to admit, that is what I recommended in post #3 and who is juco vs scudo? I thought someone was highjacking the thread.
    glad you got it resolved.

  8. #8
    Registered User
    Join Date
    09-23-2007
    Posts
    53

    Re: How to stop #Div/0! in formula result.

    I have to admit, that is what I recommended in post #3 and who is juco vs scudo?
    Sorry about that, over the years when I have forgotten passwords / user name I have had to re-register, (not just this site) and sometimes if I put in the user name it states already being used etc. But yes both names are me :-(

+ 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. How to stop cell's new value impact a formula result
    By Babosh in forum Excel General
    Replies: 2
    Last Post: 07-18-2017, 06:12 AM
  2. Replies: 7
    Last Post: 11-27-2015, 11:12 AM
  3. Convert a formula result to text so another formula can find that result
    By rwoollams in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-12-2014, 01:49 AM
  4. [SOLVED] Help with Formula using variable as Date and result as integer, error in my result
    By Elomaldo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2014, 04:20 PM
  5. [SOLVED] How to stop a result going below zero
    By suma in forum Excel General
    Replies: 3
    Last Post: 09-15-2012, 05:40 PM
  6. [SOLVED] Advanced formula - Return result & Show Cell Reference of result
    By Irv in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-05-2006, 10:40 PM
  7. stop excel from rounding a result
    By Hazeldean in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-13-2005, 06:06 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