conditional average in excel

本秂侑毒 提交于 2019-12-13 07:10:08

问题


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:

take the average of % of contract value but only for rows where contract type = "sell" and confidence = 3.

In other words the answer to this should be (3 + 5)/2 = 4

Is there an easy way to do this in excel????


回答1:


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,"sell",D2:D5,3)



来源:https://stackoverflow.com/questions/40034961/conditional-average-in-excel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!