+ Reply to Thread
Results 1 to 5 of 5

"Average" Formula Returns #DIV/0 error

  1. #1
    Registered User
    Join Date
    06-26-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    36

    "Average" Formula Returns #DIV/0 error

    Hello everyone,

    I'm working with a spreadsheet where...
    B1=AVERAGE(I2:I11)

    E1=large(Gas!A:A,1)

    F1=INDEX(Gas!$A:$H,MATCH($E2,Gas!$A:$A,0))

    F1:M11 is populated using the formula from F1 above.
    I have one copy of this spreadsheet where B1 returns me the average from I2:I11 perfectly as I would expect it too. However, in an exact copy of this spreadsheet (copy and paste), the formula returns #DIV/0.

    Any suggestions?

    Thank you,

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: "Average" Formula Returns #DIV/0 error

    Hi Tyler,

    Check to see if you have TEXT instead of numbers that you are dealing with. Also instead of using the whole column A:A it is much better to use a defined number of rows, like A5:A500.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: "Average" Formula Returns #DIV/0 error

    DIV/0 error means you are dividing by 0, When you copy paste, did you paste in the exact same location as well? being that all of your references are not absolute it is possible that it is trying to obtain values that may not be there.

    Can you post a copy of this example - then we can take a look and make better suggestions. If it works in one it should work in the other, I would have to assume without seeing it that your references are to empty cells -

    Or as Marvin pointed out, could be formatting...

    Go Advance (ALT+X) and share a sample so we can see what is occurring.
    -If you think you are done, Start over - ELeGault

  4. #4
    Registered User
    Join Date
    06-26-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: "Average" Formula Returns #DIV/0 error

    This is in a Google Sheet, here is the link: https://docs.google.com/spreadsheets...it?usp=sharing

    I'm dealing with the "Stats" tab.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: "Average" Formula Returns #DIV/0 error

    I have looked at your file, (and its official, I dont like google docs lol).

    Be that as it may, I would suggest that you change the formulas like this 1...
    =if(sum(D7:D13)>0,sum(D7:D13),"-")
    to just this...
    =sum(D7:D13)
    my reason for suggesting this, if that with all those "-" in the column, doing further calcs could be troublesome

    Also, I would advise against merging cells like you have, merging causes all sorts of problems with calcs

    Finally, you are getting #Div/O for that very good reason, you have no data to average. Try using IFERROR() to trap that
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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] Range.find returns "Nothing" in error, not sure of cause
    By enphynity in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-14-2013, 04:00 PM
  2. [SOLVED] if formula returns ":false" instead of "0"
    By pja_14 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-20-2013, 04:09 AM
  3. macro returns error "Method 'Open' of object '_Recordset' failed"
    By Leafgreen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-09-2009, 05:40 AM
  4. Me.Controls.Add returns "Compile error, method or data member not found"
    By mattisch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2007, 07:53 AM
  5. Replies: 5
    Last Post: 04-12-2006, 12:25 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