how to count if in two columns ?

Hello,

I have a column with numbers and a second column filled with with letters V or D

i want to count if the range searched meets my criteria, like: bigger than 4 and =V, but i always get an error
i´have tried several functions.

i have used:

=CountIF(I5:I600;">=4";M5:M600;"=v")
ERROR 504

=SUMPRODUCT( (I5:I600~">=4"~M5:M600;"=v"))
ERROR 502

Can anyone help me? thank you.

You are almost there. Try …

=COUNTIFS(I5:I600;">=4";M5:M600;"v")

or

=SUMPRODUCT(I5:I600>=4;M5:M600="v")

Thank you so much Keme! it worked! :>

The “S” in COUNTIFS indicates that it works for a Set of conditions. A few other summary/conditional functions have a similar “set” counterpart.

The COUNTIFS function separates range from value parameters. The value parameters also allow specifying a condition as a string. This ambiguity may be useful at times, but may cause mistakes at other times.

With SUMPRODUCT each compare is a separate logical operation. Less intuitive, I guess, but also less risk of mistakes once you get used to the mathemathical mindset.