Excel中的条件平均值 [英] conditional average in excel
问题描述
我有一张excel表,其中是这些列:
I have an excel sheet where these are the columns:
% of contract value = c(4,3,5,6)
contract type = c("sell", "sell", "sell", "buy")
confidence = c(5, 3, 3, 3)
.
我想进行以下条件平均:
I would like to do a conditional average as follows:
取% of contract value
的平均值,但仅适用于contract type = "sell"
和confidence = 3
的行.
take the average of % of contract value
but only for rows where contract type = "sell"
and confidence = 3
.
换句话说,答案应该是(3 + 5)/2 = 4
In other words the answer to this should be (3 + 5)/2 = 4
在excel中有一种简单的方法吗??
Is there an easy way to do this in excel????
推荐答案
如果在Excel工作表中使用c(bla,bla,bla)表示法,它的目的是什么?如果您的数据以表格的形式排列,那么您可以轻松地使用AverageIfs函数.
What is the purpose of the c(bla,bla,bla) notation if this is in an Excel worksheet? If your data is arranged in a table, then you can easily use the AverageIfs function.
= AVERAGEIFS(B2:B5,C2:C5,卖出",D2:D5,3)
=AVERAGEIFS(B2:B5,C2:C5,"sell",D2:D5,3)
这篇关于Excel中的条件平均值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!