COUNTIF function for 'all others'

T

terrapinie

I have a column to count the number of occurrences of certain statuses.
And have set up the COUNTIF function for three of the status lables,
and I want to have the fourth to count the number of items with any
other status.
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?
If need be, I could set it up to be COUNTIF(A1:A6, does not equal
"III","OOO","XXX")

But I don't know how to do that either...

Thanks a ton in advance!!
Laurie
 
H

Harlan Grove

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"}))
 
T

terrapinie

Yes - the CountA - Sum worked.
And I was able to use a similar method for the column next to that to
sum the dollar values of the 'other' statused values.

Thanks a ton!!
And you guys are fast!!
Laurie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top