开发者

Excel - DSUM With Criteria In Column

I am looking for a solution where I can use something like DSUM, but have 1 headi开发者_运维百科ng and the criteria from each row being in that row.

For example:

=DSUM('All Data'!A1:J999, 'All Data'!F1, B1:C2)
=DSUM('All Data'!A1:J999, 'All Data'!F1, B3:C3)

The first one works because it is getting the column headers in B1 and C1 and matching the value, but the 2nd row won't work because it doesn't know the column heading to match to.

I am looking to match two sets of criteria.

Is there any way to do a function like this without having to list column names each row?

Thanks.


Using SUMIFS like lionz suggested above works:

SUMIFS('All Data'!$F$1:$F$999,'All Data'!$A$1:$A$999,B2,'All Data'!$A$1:$A$999, C2)
SUMIFS('All Data'!$F$1:$F$999,'All Data'!$A$1:$A$999,B3,'All Data'!$A$1:$A$999, C3)

and so on.


Have you looked into sumifs? (available in excel 2007/2010) Otherwise, you can look into sumproduct.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜