COUNTIFS函数具有多个值的Excel

时间:2016-08-02 15:46:13

标签: excel excel-formula

我的表格数据如下:

<table>
<tr>
<th>Priority</th>
<th>State</th>
</tr>
<tr>
<td>High</td>
<td>Work - QA</td>
</tr>
<tr>
<td>High</td>
<td>In progress</td>
</tr>
<tr>
<td>Low</td>
<td>Investigating</td>
</tr>
<tr>
<td>High</td>
<td>Ready for Deployment - QA</td>
</tr>
<tr>
<td>Critical</td>
<td>Investigating</td>
</tr>
<tr>
<td>Critical</td>
<td>Work - QA</td>
</tr>
<tr>
<td>Critical</td>
<td>Work - Dev</td>
</tr>
</table>

想生成如下报告:

Summary Report for DEV
------------------------    
Critical    1
High    2
Low         1

以下状态中的缺陷表示它们属于DEV&#34;工作 - 开发,调查,进行中&#34; 。因此,当我创建摘要报告时,我必须统计属于上述状态字段的所有缺陷。

我确实尝试过这样的事情,但失败了。

=COUNTIFS(Table1[[#All],[Priority]],"High",Table1[[#All],[State]],{"Investigation", "In progress", "Work - Dev"})

1 个答案:

答案 0 :(得分:0)

如此接近。您的公式会返回一个数组{0,1,1},因此您需要SUM它:

=SUM(COUNTIFS(Table1[[#All],[Priority]],"High",Table1[[#All],[State]],{"Investigation","In progress","Work - Dev"}))