Re: COUNTIF function for 'all others'

Tech-Archive recommends: Speed Up your PC by fixing your registry



terrapinie wrote...
....
>For example
> A B
>1 III COUNTIF(A1:A6,"III")
>2 XXX COUNTIF(A1:A6,"XXX")
>3 VVV COUNTIF(A1:A6,"OOO")
>4 III COUNTIF(AI:A6,"anything else")
>5 OOO
>6 NNN
>
>and B1=2, B2=1, B3=1, B4=2.
>
>Is this possible, and how do I do it?

There's no simple way to do this generally, but there are fairly simple
ways to do this in your particular situation. The simplest would be

B4:
=COUNTA(A1:A6)-SUM(B1:B3)

and if there were no conditional counts in B1:B3,

=COUNTA(A1:A6)-SUM(COUNTIF(A1:A6,{"III","XXX","OOO"}))

.