+ Reply to Thread
Results 1 to 7 of 7

average function

  1. #1
    Stephen
    Guest

    average function

    How do I average a column of numbers and exclude cells with zero values?

  2. #2
    Biff
    Guest

    Re: average function

    Hi!

    Try this:

    Entered as an array using the key combination of CTRL,SHIFT,ENTER:

    =AVERAGE(IF(A1:A20<>0,A1:A20))

    Biff

    "Stephen" <[email protected]> wrote in message
    news:[email protected]...
    > How do I average a column of numbers and exclude cells with zero values?




  3. #3
    Harlan Grove
    Guest

    Re: average function

    Biff wrote...
    >Try this:
    >
    >Entered as an array using the key combination of CTRL,SHIFT,ENTER:
    >
    >=AVERAGE(IF(A1:A20<>0,A1:A20))

    ....

    As I never tire of pointing out, better to use

    =AVERAGE(IF(rng>0,rng))

    because if values could be negative as well as positive, then
    legitimate values could also be zero, so the only time it make sense
    (mathematically) to exclude zeros is when all values should be only
    positive or only negative.


  4. #4
    Stephen
    Guest

    Re: average function

    =AVERAGE(IF(H2:H132<>0,H2:H132)) is the function I wrote from your example
    and I am still getting an error. Is there anything wrong with the function I
    have typed?

    Stephen


    "Biff" wrote:

    > Hi!
    >
    > Try this:
    >
    > Entered as an array using the key combination of CTRL,SHIFT,ENTER:
    >
    > =AVERAGE(IF(A1:A20<>0,A1:A20))
    >
    > Biff
    >
    > "Stephen" <[email protected]> wrote in message
    > news:[email protected]...
    > > How do I average a column of numbers and exclude cells with zero values?

    >
    >
    >


  5. #5
    Stephen
    Guest

    Re: average function

    What does "rng" stand for in this function?

    Stephen


    "Harlan Grove" wrote:

    > Biff wrote...
    > >Try this:
    > >
    > >Entered as an array using the key combination of CTRL,SHIFT,ENTER:
    > >
    > >=AVERAGE(IF(A1:A20<>0,A1:A20))

    > ....
    >
    > As I never tire of pointing out, better to use
    >
    > =AVERAGE(IF(rng>0,rng))
    >
    > because if values could be negative as well as positive, then
    > legitimate values could also be zero, so the only time it make sense
    > (mathematically) to exclude zeros is when all values should be only
    > positive or only negative.
    >
    >


  6. #6
    Harlan Grove
    Guest

    Re: average function

    Stephen wrote...
    >=AVERAGE(IF(H2:H132<>0,H2:H132)) is the function I wrote from your example
    >and I am still getting an error. Is there anything wrong with the function I
    >have typed?

    ....
    >"Biff" wrote:

    ....
    >>Entered as an array using the key combination of CTRL,SHIFT,ENTER:

    ....

    It needs to be an array formula. You don't just type it an press
    [Enter], you type it, hold down [Ctrl] and [Shift] keys and press
    [Enter].

    If the error is #VALUE!, then the odds are you didn't enter it as an
    array formula.

    If the error is #DIV/0!, then the odds are there are no nonzero numbers
    in H2:H132.

    If the error is anything else, then you have that error value in at
    least one cell in H2:H132.


  7. #7
    Harlan Grove
    Guest

    Re: average function

    Stephen wrote...
    >What does "rng" stand for in this function?

    ....

    It's a placeholder for whatever range address you want to use.


+ 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