+ Reply to Thread
Results 1 to 3 of 3

Averaging issues with #DIV/0! and excluding 0's in Linked workbooks and e/o row foreach mo

  1. #1
    Registered User
    Join Date
    06-20-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    15

    Averaging issues with #DIV/0! and excluding 0's in Linked workbooks and e/o row foreach mo

    Attached 2010 doc has notes and testing examples on the last sheet: Testing Average Sheet

    1st Line in each month need to exclude # DIV/0!

    The 2nd line in each month is the average % outside of parameters comming from another workbook sheet on our server. Because its not averaging the whole column and instead only every other line I am having issues with both average and avarageif statements in 2010.

    Please Keep in mind this sheet is created for future months as well that do not have data entered yet and and pulls 0's and #DIV/0! but would like to pull YTD data averages.

    Thanks so much for all your support. I have spent days on this and searched and read through the forums here, lots of helpful things, and testing but have not found my answer for this project yet.

    Thanks,

    CRUSROD
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Averaging issues with #DIV/0! and excluding 0's in Linked workbooks and e/o row foreac

    All your cells point to a specific cell on another workbook.. so that cell probably has the error too...

    In that workbook, what is the typical formula?

    That error occurs when you the divisor of a division formula is 0... so you need to avoid that but checking for the divisor and working around the 0

    e.g.

    =IF(X1=0,0,Y1/X1)

    This checks if X1 is 0 first, so that instead of an error you get a result of 0... if the divisor is not 0, then you can proceed with calculation.

    in A26 of Testing Average Sheet, you check the sum of the cells for 0...

    so:

    =IF(SUM(A1,A3,A5,A7,A9,A11,A13,A15,A17,A19,A21,A23)=0,0,AVERAGE(A1,A3,A5,A7,A9,A11,A13,A15,A17,A19,A21,A23))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-20-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Averaging issues with #DIV/0! and excluding 0's in Linked workbooks and e/o row foreac

    Thanks NBVC!!

    Your second suggestion worked and I beleive for most my cases, except for the issue your questioning in my first part of my question as they pull together.

    Your Question:"In that workbook, what is the typical formula?"

    Well it's either this for my Normal Average: =AVERAGE(D7:D37)
    Or its this for my % outside of parametors: =SUM(COUNTIF(D7:D36,"<="&D5-0.0001),COUNTIF(D7:D36,">="&D6+0.00001))/100*3.3333333

    (I did the 100/3.3333333 because its a 30 day month and i took 100/30 to get my 3.3333333 to get a more accurate %"
    parametors. The more I am playing with this I sometimes have a 0 (zero) as real number so I cant exclude a zero).

    Is there a way if its blank stay blank and or if its a #DIV/0! to exlcude it to a blank?

    Every time I try to put a statement in H34 I should be getting the 64.73% but cause of the 0.00% pulling from a blank on the workbook from thes server its screwing up my percentage.

    Ok, On H33 I am getting a #DIV/0! when I should be getting a 12.82
    . With your help I could edit either this sheet or the original sheet in the workbook on the server and exclude the #DIV/0! to get the correct value?

    I hope I am explaining all this correct not to confuse you.

    Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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