+ Reply to Thread
Results 1 to 4 of 4

skipping #DIV/0 when averaging range

  1. #1
    Registered User
    Join Date
    03-17-2006
    MS-Off Ver
    2007
    Posts
    93

    skipping #DIV/0 when averaging range

    Probably simple, but I have had no luck searching. I do recall seeing a post about this awhile back.

    I have a column of formulas pulling info from multiple worksheets..

    I am then averaging (or sum, or countif, etc) that column.

    Some of the cells contain #DIV/0 of a zero due to no data in the cell being pulled from so the average formula does not work correctly.

    I can do =IF(PCHI!$R$3="0","",PCHI!$R$3), but the problem is the quantity of these I would have to do as the column is long and each cell pulls from a differently named sheet AND I pull info to the final destination from multiple other cells within each sheet that would require the same type formula to be typed, and in the case of AVERAGE I do not want a zero returned if nothing is entered.



    So I just need to know how to not read the #DIV/0 (or #VALUE) errors that are contained within the range to be averaged.



    thanks

    joe
    Better to be roughly right than exactly wrong, unless you are using Excel.

  2. #2
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    Quote Originally Posted by redneck joe
    Probably simple, but I have had no luck searching. I do recall seeing a post about this awhile back.

    I have a column of formulas pulling info from multiple worksheets..

    I am then averaging (or sum, or countif, etc) that column.

    Some of the cells contain #DIV/0 of a zero due to no data in the cell being pulled from so the average formula does not work correctly.

    I can do =IF(PCHI!$R$3="0","",PCHI!$R$3), but the problem is the quantity of these I would have to do as the column is long and each cell pulls from a differently named sheet AND I pull info to the final destination from multiple other cells within each sheet that would require the same type formula to be typed, and in the case of AVERAGE I do not want a zero returned if nothing is entered.



    So I just need to know how to not read the #DIV/0 (or #VALUE) errors that are contained within the range to be averaged.



    thanks

    joe
    Try: =AVERAGE(IF(ISERROR(A1:A30),"",$A$1:$A$30))

    Enter it with CTRL+SHIFT+ENTER.

    Scott

  3. #3
    Registered User
    Join Date
    03-17-2006
    MS-Off Ver
    2007
    Posts
    93
    perfect.

    I see the by entering the ctl shift enter adds the {}. which I have seen before, but what exactly does that do?

    Why does it not work just typing those in?

  4. #4
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    Quote Originally Posted by redneck joe
    perfect.

    I see the by entering the ctl shift enter adds the {}. which I have seen before, but what exactly does that do?

    Why does it not work just typing those in?
    I'm not one to be giving a technical explanation, but basically, the {} indicate that the formula is an array formula. It's just an indicator for when you are looking at the cell so that you know that it is an array formula, as otherwise there isn't really any indicator.

    Someone else can probably do a better job of explaining this.

    Scott

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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