如果單元格不是空的,則計算平均值

[英]Calculate average if cell is not blank


I'm building a scoring spreadsheet that is gradually populated as additional data is received.

我正在構建一個計分電子表格,隨着接收到更多的數據而逐漸填充。

I want to create a formula that will give me the running average (that will change as more data is inputted) that is dependent on 2 columns.

我想創建一個公式,它將給我一個依賴於2列的運行平均值(將會隨着更多數據的輸入而改變)。

Essentially I have 3 columns: Column A has a Report #, Column B the name of an organization, and Column C which has a score.

基本上我有3列:A列有一個報告#,B列有一個組織的名稱,C列有一個分數。

The formula should calculate an average that does not include blank or zero scores in the calculation but only uses those scores associated with a specific organization.

公式應該計算一個平均值,它不包括在計算中的空白或零分數,但只使用與某個特定組織相關的分數。

I've tried the following:

我試過以下:

=IF(B2:B100="organization", AVERAGEIF(C2:C100, ">0"))

Also:

另外:

=IF(B2:B100="organization", IF(C2:C100="","",AVERAGE(C2:C100)

In both instances I get a #Value error.

在這兩個實例中,我都會得到一個#Value錯誤。

The issue is that the AVERAGE() or AVERAGEIF() function need to target only those scores that meet the B2:B100="organization" criteria

問題是,AVERAGE()或AVERAGEIF()函數只需要針對那些符合B2:B100=“組織”標准的分數

1 个解决方案

#1


1  

You need to use AVERAGEIFS

你需要使用AVERAGEIFS

=AVERAGEIFS(C2:C100, B2:B100, "organization", C2:C100, ">0")

According to the Office Support this takes the range you wish to average followed by n range/criteria pairs.

根據辦公室的支持,這需要您希望的范圍,然后是n個范圍/標准對。

This formula finds the average of Column C between rows 2 and 100, where the B column value is "organization" and C column value is greater than zero. This will also automatically handle blanks in the range.

這一公式發現了第2行和第100行之間的C列的平均值,其中B列值為“組織”,C列值大於零。這也將自動處理范圍內的空格。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2015/11/19/721136370f5392b3ffdc9ff433b6c322.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com