ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Average (https://www.excelbanter.com/excel-worksheet-functions/9146-average.html)

Hague2

Average
 
Column A1:A10 has a 0 or 1 in each cell, Column B1:B10 has numbers. I want
to be able to select the 0 (zero's) in Column A and AVERAGE only those
numbers at right in Column B.

I tried AVERAGE(IF(A1:A10=0,B1:B10) but got an average of all the numbers
in Column B, not just those at the right of 0.

JulieD

Hi

=SUMIF(A1:A10,0,B1:B10)/COUNTIF(A1:A10,0)

Cheers
JulieD

"Hague2" wrote in message
...
Column A1:A10 has a 0 or 1 in each cell, Column B1:B10 has numbers. I
want
to be able to select the 0 (zero's) in Column A and AVERAGE only those
numbers at right in Column B.

I tried AVERAGE(IF(A1:A10=0,B1:B10) but got an average of all the numbers
in Column B, not just those at the right of 0.




Jerry W. Lewis

Your formula is fine, but must be array entered (Ctrl-Shift-Enter) to work.

Jerry

Hague2 wrote:

Column A1:A10 has a 0 or 1 in each cell, Column B1:B10 has numbers. I want
to be able to select the 0 (zero's) in Column A and AVERAGE only those
numbers at right in Column B.

I tried AVERAGE(IF(A1:A10=0,B1:B10) but got an average of all the numbers
in Column B, not just those at the right of 0.




All times are GMT +1. The time now is 05:34 AM.

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