+ Reply to Thread
Results 1 to 7 of 7

Need help with averageifs function - keeps returning #DIV/0

  1. #1
    Registered User
    Join Date
    10-25-2015
    Location
    Ontario, Canada
    MS-Off Ver
    2013
    Posts
    2

    Need help with averageifs function - keeps returning #DIV/0

    My husband and I have been working on finding a solution for this problem and fear that we may end up breaking both of our computers if we do not find a solution soon.

    We have a pivot table which is importing external data. We need to find averages per minute that match specific criteria. Our formula is as follows:

    =AVERAGEIFS(C$5:C$50000,A$5:A$50000,M5,B$5:B$50000,P5)

    I have attached a copy of our spreadsheet so that you can get a better picture of what we need help with. (You will note that all the averages are on the right side. I had to condense the amount of information on the spreadsheet in order to make the file size small enough to upload so it obviously doesn't go to 50000)

    We attempted adding =if(C:C,<>0,C:C,C:C( which took away the #DIV/0, however, the averages weren't accurate.

    PLEASE HELP
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-10-2015
    Location
    Houston
    MS-Off Ver
    2013
    Posts
    26

    Re: Need help with averageifs function - keeps returning #DIV/0

    It seems when the new times are calculated in column P they dont equal the times in column B. For example in P6 where you have 07:10:00 when you convert it to a number the value is .29861555555556 and the same time in B16 for example has the value as .29861.

    If you copy the time from B17 and paste it to P6 so the times are exactly the same your formula works. I dont know the solution yet, but the times not really being equal seems to be the problem.

  3. #3
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Need help with averageifs function - keeps returning #DIV/0

    This looks like a rounding issue. The timestamp from the pivot table are all rounded to 5 decimal places whereas the method you've calculated the time on column P are not.

    I'm very certain there is a Pivot Table solution for this, but I am not an expert on Pivot Tables. Perhaps someone else can answer that part.

    A formulaic solution would be to type in this into Q5, copy across to column U, and down as far as you need to go (see attached)
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Need help with averageifs function - keeps returning #DIV/0

    Here's a Pivot Table solution I managed to whip up (by trial and error). Since I don't have your source data, I've copied the table over to a new workbook and used that as the source data. Perhaps this may help.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-10-2015
    Location
    Houston
    MS-Off Ver
    2013
    Posts
    26

    Re: Need help with averageifs function - keeps returning #DIV/0

    Copying the solution from quekbc, here is another way by formatting the times to text

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Need help with averageifs function - keeps returning #DIV/0

    Alternative solution without changing the Pivot source:

    Q5 then drag down and accross:

    Please Login or Register  to view this content.
    Quang PT

  7. #7
    Registered User
    Join Date
    10-25-2015
    Location
    Ontario, Canada
    MS-Off Ver
    2013
    Posts
    2

    Re: Need help with averageifs function - keeps returning #DIV/0

    This solved our problem and saved the lives of our computers!!!

    Pretty sure I saw a tear run down my husband's face..

    Thank you so much!!!

+ 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] Help with AVERAGEIFS and OR function
    By malleat1 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 12-03-2014, 10:30 AM
  2. [SOLVED] Averageifs returning #DIV/0 error
    By kbotta in forum Excel General
    Replies: 8
    Last Post: 10-09-2014, 08:38 AM
  3. Challenging averageifs function help!
    By atung in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 05-22-2014, 07:13 PM
  4. [SOLVED] Averageifs returning DIV/0 errors even though there are values
    By lifeseeker1019 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-12-2013, 02:19 AM
  5. [SOLVED] Averageifs Countifs function
    By vandan_tanna in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2013, 11:14 AM
  6. Excel 2007 : Averageifs function
    By SDruley in forum Excel General
    Replies: 2
    Last Post: 05-13-2009, 10:43 PM
  7. Averageifs returning Value?
    By katja328 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-08-2009, 06:20 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