+ Reply to Thread
Results 1 to 6 of 6

Averaging with zeros NOT

Hybrid View

Guest Averaging with zeros NOT 08-18-2005, 02:05 PM
Excel_Geek RE:Averaging with zeros NOT 08-18-2005, 02:20 PM
Guest Re: Averaging with zeros NOT 08-18-2005, 03:05 PM
Guest RE: Averaging with zeros NOT 08-18-2005, 03:05 PM
Guest Re: Averaging with zeros NOT 08-18-2005, 03:05 PM
Guest Re: Averaging with zeros NOT 08-18-2005, 03:05 PM
  1. #1
    Tom
    Guest

    Averaging with zeros NOT

    {=AVERAGE(IF(Prov!$A$2:$A$2978=$A2,Prov!$R$2:$R$2978))}

    Above is a formula that succesfully averages what I want. However
    sometime the Prov!range r2:R2978 contains zeros.

    How can I eliminate those zeros from the average?

    The first part of the formula with the cell reference is looking up and
    match a name before performin the average..

    TIA

    Tom


  2. #2
    Registered User
    Join Date
    08-18-2005
    Posts
    59

    RE:Averaging with zeros NOT

    You could create another column of data that read's the column you wish to average like this {=if(A2=0,"",A2). This will effectively replace the zeros with blanks, which are not included as zero values in an average. Then you can change the column you wish to average with the new column.

    There'd be a myriad of more complicated and VBA-involved solutions, but this is quick and easy.

  3. #3
    Bob Phillips
    Guest

    Re: Averaging with zeros NOT

    =AVERAGE(IF((Prov!$A$2:$A$2978=$A2)*(Prov!$R$2:$R$2978<>0),Prov!$R$2:$R$2978
    ))

    still an array formula

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Tom" <TesnoBay@comcast.net> wrote in message
    news:1124387946.250329.45000@z14g2000cwz.googlegroups.com...
    > {=AVERAGE(IF(Prov!$A$2:$A$2978=$A2,Prov!$R$2:$R$2978))}
    >
    > Above is a formula that succesfully averages what I want. However
    > sometime the Prov!range r2:R2978 contains zeros.
    >
    > How can I eliminate those zeros from the average?
    >
    > The first part of the formula with the cell reference is looking up and
    > match a name before performin the average..
    >
    > TIA
    >
    > Tom
    >




  4. #4
    DaveB
    Guest

    RE: Averaging with zeros NOT

    Add another if statement right before you do the average:
    =AVERAGE(IF(Prov!$A$2:$A$2978=$A2,IF(Prov!$R$2:$R$2978=0,"",Prov!$R$2:$R$2978),""))

    --
    Regards,

    Dave


    "Tom" wrote:

    > {=AVERAGE(IF(Prov!$A$2:$A$2978=$A2,Prov!$R$2:$R$2978))}
    >
    > Above is a formula that succesfully averages what I want. However
    > sometime the Prov!range r2:R2978 contains zeros.
    >
    > How can I eliminate those zeros from the average?
    >
    > The first part of the formula with the cell reference is looking up and
    > match a name before performin the average..
    >
    > TIA
    >
    > Tom
    >
    >


  5. #5
    Biff
    Guest

    Re: Averaging with zeros NOT

    Hi!

    Try this:

    Array entered:

    =AVERAGE(IF((Prov!$A$2:$A$2978=$A2)*(Prov!$R$2:$R$2978<>0),Prov!$R$2:$R$2978))

    Biff

    "Tom" <TesnoBay@comcast.net> wrote in message
    news:1124387946.250329.45000@z14g2000cwz.googlegroups.com...
    > {=AVERAGE(IF(Prov!$A$2:$A$2978=$A2,Prov!$R$2:$R$2978))}
    >
    > Above is a formula that succesfully averages what I want. However
    > sometime the Prov!range r2:R2978 contains zeros.
    >
    > How can I eliminate those zeros from the average?
    >
    > The first part of the formula with the cell reference is looking up and
    > match a name before performin the average..
    >
    > TIA
    >
    > Tom
    >




  6. #6
    Earl Kiosterud
    Guest

    Re: Averaging with zeros NOT

    Tom,

    =SUMIF(A2:A2978,A2,R2:R2978)/SUMPRODUCT((A2:A2978=A2)*(R2:R2978<>0))

    Array-entering not necessary.
    --
    Earl Kiosterud
    www.smokeylake.com

    "Tom" <TesnoBay@comcast.net> wrote in message
    news:1124387946.250329.45000@z14g2000cwz.googlegroups.com...
    > {=AVERAGE(IF(Prov!$A$2:$A$2978=$A2,Prov!$R$2:$R$2978))}
    >
    > Above is a formula that succesfully averages what I want. However
    > sometime the Prov!range r2:R2978 contains zeros.
    >
    > How can I eliminate those zeros from the average?
    >
    > The first part of the formula with the cell reference is looking up and
    > match a name before performin the average..
    >
    > TIA
    >
    > Tom
    >




+ 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