+ Reply to Thread
Results 1 to 6 of 6

How to omit zero values when calculating averages?

  1. #1
    Registered User
    Join Date
    09-20-2011
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2010
    Posts
    5

    How to omit zero values when calculating averages?

    Hi,

    I'd like to find a method that allows me to calculate an ongoing YTD average that omits any zero values present in the source data range.

    Any zero values in the source data are not valid, so the purpose of omitting them serves to avoid my YTD average becoming skewed due to inclusion of the zero values.

    Below is an example of the formula I'm using (pls see attached screenshot for further reference).

    G23: =AVERAGE(L23)
    G24: =AVERAGE($L$23:L24)
    G25: Etc.

    screenshot - ss.jpg

    Thanks for any assistance that can be provided,
    Jason
    Last edited by jason-w; 02-01-2012 at 12:59 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: How to omit zero values when calculating averages?

    something like this should do it, edit range to suite

    =SUMIF(A1:A1000,">0")/COUNTIF(A1:A1000,">0")
    Last edited by Jack in the UK; 02-01-2012 at 12:33 PM.

  3. #3
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: How to omit zero values when calculating averages?

    playing about a CSE formula would be

    =AVERAGE(IF($A$1:$A$1000 <>0,$A$1:$A$1000))
    so reads { the above } press CTRL+SHIFT+ Enter all at the same time

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

    Re: How to omit zero values when calculating averages?

    If you have 2010, you can use AVERAGEIF

    =AVERAGEIF($A$1:$A$1000,"<>0")
    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.

  5. #5
    Registered User
    Join Date
    09-20-2011
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: How to omit zero values when calculating averages?

    Thanks all - the following worked great for me:

    =sum(l23)/countif(l23,">0")
    =sum($l$23:l24)/countif($l$23:l24,">0")

    NBVC, I do have 2010, so I'll also try that more simplified formula. Thx.

  6. #6
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: How to omit zero values when calculating averages?

    Hi Jason
    Glad You got is sorted and thanks for letting us all know

    Good luck
    jiuk

+ 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