ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Need help (Average excluding zero values) (https://www.excelbanter.com/excel-discussion-misc-queries/252882-need-help-average-excluding-zero-values.html)

Mike

Need help (Average excluding zero values)
 
This is what i have & it works but one problem there will be zero values & i
need to exclude them if possible
=AVERAGE(IF(AA5="L",E$5:E$65))
I have tried several different combinations I can,t get it

Gary Keramidas

Need help (Average excluding zero values)
 
that includes zero values in the average for me. are they blanks and not zeroes?

--


Gary Keramidas
Excel 2003


"Mike" wrote in message
...
This is what i have & it works but one problem there will be zero values & i
need to exclude them if possible
=AVERAGE(IF(AA5="L",E$5:E$65))
I have tried several different combinations I can,t get it



Bernard Liengme[_2_]

Need help (Average excluding zero values)
 
Is you aim to compute the average only when AA5 ="L" ?
Then you formula should be =IF(AA5="L", AVERAGE(E$5:E$65), "")

To omit zeros in the average
=IF(AA5="L",AVERAGE(IF(E$5:E$65<0,E$5:E$65)),"")
This is an array formula and Excel will enclose in in braces { ... }

This is a non-array formula that does the same
=IF(D1="L",SUM(A1:A7)/COUNTIF(A1:A7,"<0"),"")
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Mike" wrote in message
...
This is what i have & it works but one problem there will be zero values &
i
need to exclude them if possible
=AVERAGE(IF(AA5="L",E$5:E$65))
I have tried several different combinations I can,t get it




All times are GMT +1. The time now is 10:29 AM.

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