ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Averaging, ignoring zeros (https://www.excelbanter.com/excel-worksheet-functions/15416-averaging-ignoring-zeros.html)

Mark

Averaging, ignoring zeros
 
How do you average values in a row, ignoring any zeros?

Bob Phillips

=AVERAGE(IF(A1:A100<0,A1:A100))

This is an array formula, so commit with Ctrl-SHift-Enter.

--

HTH

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


"Mark" wrote in message
...
How do you average values in a row, ignoring any zeros?




Peo Sjoblom

=AVERAGE(IF(A1:D1<0,A1:D1))

entered with ctrl + shift & enter

--

Regards,

Peo Sjoblom


"Mark" wrote in message
...
How do you average values in a row, ignoring any zeros?




CLR

=SUM(A:A)/COUNTIF(A:A,"<0")

Vaya con Dios,
Chuck, CABGx3


"Mark" wrote in message
...
How do you average values in a row, ignoring any zeros?




Jason Morin

Just an alternative to the typical AVERAGE array formula:

=SUM(1:1)/SUM(COUNTIF(1:1,{"<","*",0})*{1,-1,-1})

HTH
Jason
Atlanta, GA

-----Original Message-----
How do you average values in a row, ignoring any zeros?
.


Harlan Grove

Peo Sjoblom wrote...
=AVERAGE(IF(A1:D1<0,A1:D1))

entered with ctrl + shift & enter

....

Normal caveats with respect to continuity - if there could be positive
and negative values, zero values should be included. If only positive
values should be included in averages, that should be made explicit,
i.e.,

=AVERAGE(IF(A1:D10,A1:D1))



All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com