SOLVED

# counting specific number in one column but cell choice will be dependent on two other columns

Copper Contributor

# counting specific number in one column but cell choice will be dependent on two other columns

Let's use the example below.

I would like to count the number of 1s in column CIF the value of A is 105, and B is 1. The end product will be a number actually. How can I write a formula for this? I tried XLOOKUP, VLOOKUP, INDEX and INDIRECT functions but I was not successful. Thank you.

A           B            C

105        1           0

105        1           1

105        1           0

105        2            1

105        2           0

105        2           0

106        1           1

108        2           1

112        1           1

best response confirmed by eminemaths (Copper Contributor)
Solution

# Re: counting specific number in one column but cell choice will be dependent on two other columns

=COUNTIFS(A1:A9,105,B1:B9,1,C1:C9,1)

This can be done with COUNTIFS.

1 best response

Accepted Solutions
best response confirmed by eminemaths (Copper Contributor)
Solution

# Re: counting specific number in one column but cell choice will be dependent on two other columns

=COUNTIFS(A1:A9,105,B1:B9,1,C1:C9,1)

This can be done with COUNTIFS.