0

我正在研究一个 Sumifs,它在 Col B 中有 2 个不同的标准,在 Col F 中有第 3 个标准。如果满足所有 3 个标准,那么我将对 Col Q 中的值求和。

到目前为止我有这个,它返回一个 0。我试图以我知道的每一种方式调整它,但仍然没有运气。

=SUMIFS($Q$4:$Q$2700, $B$4:$B$2700, "=AUS", $B$4:$B$2700, "=VCO", $F$4:$F$2700, "=TRB")
4

2 回答 2

1

The formula you provided returns 0 every time because the value in B cannot be both AUS AND VCO, it's one or the other.

As far as I know (someone correct me if I'm wrong), there's currently no way to have a conditional statement in a single criteria range (e.g. "=AUS" OR "=VCO"). A workaround could be the following:

=SUM(SUMIFS(Q4:Q8,B4:B8,{"AUS","VCO"},F4:F8,"=TRB"))

enter image description here

This sums the values in Q if B equals either AUS OR VCO AND F equals TRB

于 2013-03-12T16:47:49.123 回答
-1

问题是您引用了 $B$4:$B$2700 两次。因为该列不可能同时是 AUS 和 VCO 列 Q 永远不会相加。

为此,请在 B 列旁边添加一个新列。使单元格 C4 的值等于 B4 的值(=B4)并将此公式拖动到单元格 B2700(您也可以双击右下角单元格使其自动填充到 B2700)。然后,您可以使用以下公式:

=SUMIFS($Q$4:$Q$2700, $C$4:$C$2700, "=AUS", $B$4:$B$2700, "=VCO", $F$4:$F$2700, "=TRB")

记得指出这个答案是否有效!

于 2013-03-12T16:34:45.937 回答