Divide by 0 error in excel

Posted on 2012-09-20
Last Modified: 2012-09-20
I have an excel report that is pulling data from a link to another workbook.  The formula is working nicely if there is data.  I would like to show "0" if there is a #div/0 error.

I am getting a #div/0 error.  Below is my formula.  Can someone help please?

=AVERAGEIF('C:\DailyShippingBacklog\[WeeklyTurnaround.xlsx]Repair Module'!$B:$B,$A17,'C:\DailyShippingBacklog\[WeeklyTurnaround.xlsx]Repair Module'!$A:$A)
Question by:orther
    LVL 18

    Expert Comment

    =ISERROR(AVERAGEIF('C:\DailyShippingBacklog\[WeeklyTurnaround.xlsx]Repair Module'!$B:$B,$A17,'C:\DailyShippingBacklog\[WeeklyTurnaround.xlsx]Repair Module'!$A:$A),0)

    Author Comment

    When I run this I receive and error:

    You've entered too many arguments for this function
    LVL 50

    Accepted Solution

    The function is IFERROR and not ISERROR, so you need

    =iferror(AVERAGEIF('C:\DailyShippingBacklog\[WeeklyTurnaround.xlsx]Repair Module'!$B:$B,$A17,'C:\DailyShippingBacklog\[WeeklyTurnaround.xlsx]Repair Module'!$A:$A),0)

    IFERROR does not exist in Excel 2003 and earlier. To make this work in Excel before 2007, try

    =if(iserror(AVERAGEIF('C:\DailyShippingBacklog\[WeeklyTurnaround.xlsx]Repair Module'!$B:$B,$A17,'C:\DailyShippingBacklog\[WeeklyTurnaround.xlsx]Repair Module'!$A:$A)),0,AVERAGEIF('C:\DailyShippingBacklog\[WeeklyTurnaround.xlsx]Repair Module'!$B:$B,$A17,'C:\DailyShippingBacklog\[WeeklyTurnaround.xlsx]Repair Module'!$A:$A))

    cheers, teylyn

    Author Closing Comment

    oh my an "Uber" formula:)

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
    How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
    This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
    This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now