计算特定值的平均值 [英] Calculating average of specific values
问题描述
我想找出一个苹果的平均价格,价格不一定总能满足,我知道我应该可以用sumproduct来做到这一点,但这对我不起作用.
I want to find out the average cost of an apple, the price isn't always filled out, I know I should be able to do this with sumproduct, but it's not working for me.
A B
Fruit Price
Apple 56
Banana 23
Apple
Apple 40
Apple
当我尝试计算输入了价格值的苹果数量时,我的问题就来了. 有人可以帮忙吗?
My problem comes when I try to count how many apples have a price value entered. Can anyone help?
注意:我使用的是Excel 2003,因此没有任何意义
推荐答案
那么您希望获得Apple的平均水平48?
So you expect to get 48 as the average for Apple?
两种可能的方式.....
Two possible ways.....
具有AVERAGE的数组公式
An array formula with AVERAGE
=AVERAGE(IF(A2:A10="Apple",IF(B2:B10<>"",B2:B10)))
已通过 CTRL + SHIFT + ENTER
....或使用SUMIF/SUMPRODUCT
....or use SUMIF/SUMPRODUCT
=SUMIF(A2:A10,"Apple",B2:B10)/SUMPRODUCT((A2:A10="Apple")*(B2:B10<>""))
这篇关于计算特定值的平均值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!