Count if two criteria match - EXCEL formula

2019-01-11 08:51发布

I have this table and I would like to create a formula which would count values based on true conditions from column A and column C.

Example: If in column A value is M (male), and in column C is YES, then it would count.

could anyone help me with this formula?

table

2条回答
smile是对你的礼貌
2楼-- · 2019-01-11 09:13

If youR data was in A1:C100 then:

Excel - all versions

=SUMPRODUCT(--(A1:A100="M"),--(C1:C100="Yes"))

Excel - 2007 onwards

=COUNTIFS(A1:A100,"M",C1:C100,"Yes")

查看更多
冷血范
3楼-- · 2019-01-11 09:22

Add the sheet name infront of the cell, e.g.:

=COUNTIFS(stock!A:A,"M",stock!C:C,"Yes")

Assumes the sheet name is "stock"

查看更多
登录 后发表回答