# Thread: Formula: Countifs Thanks:  1 Post #5341200 (1) Likes:  1 Post #5341200 (1)

1. ## Formula: Countifs

Hi guys

I'm trying to put together a countifs statement but am getting a little stuck.

I want the formula to calculate how many blanks are in the corresponding C column, if the value in the B column is 5.

I managed the first condition (to count how many 5s there are in B):
=COUNTIF(B2:B10,5)

However, I don't know how to then get it to test the next condition whereby of the cells with 5, how many have blanks cells next to them in column C.

2. ## Re: Formula: Countifs

Try this =COUNTIFS(B2:B10,5,C2:C10,"")

3. ## Re: Formula: Countifs

That works great!! Thank you so much!

4. ## Re: Formula: Countifs

Just another query. I did not consider this initially but have now realised that I need to check Column C for another factor.

Column C could either be blank or could have the value "Hold". I need to count both the blank and the Hold ones.

I tried to use OR but ended up with a "You've entered too few arguments for this function".
=COUNTIFS(B2:B10,5,OR(C2:C10="",C2:C10="Hold"))

What is wrong with my statement?

5. ## Re: Formula: Countifs

BCDEF
1
36d
42d
53
65
76
89
95f
106
11

Sheet7

Array Formulas
CellFormula
F2{=SUM(COUNTIFS(B2:B10,5,C2:C10,{"","Hold"}))}
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself