count if

K

Kevin

=COUNTIF(B4:B17,"X")

this works great with X, but I would like to include L and V in this formula.
How would I do this???

Thanks
 
D

Dave Peterson

You could do the brute force version:
=COUNTIF(B4:B17,"X")+COUNTIF(B4:B17,"L")+COUNTIF(B4:B17,"V")

or you could use something like:

=SUM(COUNTIF(B4:B17,{"X","L","V"}))
This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)
 
A

Alan Beban

Dave said:
You could do the brute force version:
=COUNTIF(B4:B17,"X")+COUNTIF(B4:B17,"L")+COUNTIF(B4:B17,"V")

or you could use something like:

=SUM(COUNTIF(B4:B17,{"X","L","V"}))
This is an array formula.

I think it's not.

Alan Beban
 
Top