***Need Help w/ "COUNTIF" Formula

Stubbi

New Member
Joined
Sep 5, 2002
Messages
2
I'm new to the board and could use some help here...I have a column that is populated with 3 letter codes IE.. ABC,DEF,GHI etc.. I am using =COUNTIF(D871:D893,"ABC") to return all cells in the column that = ABC and others.. I want to be able to count all the other 3 letter codes besides ABC,DEF,GHI.. And am having a world of trouble...Can anyone help.
In laymans terms this is what I would like.
=COUNTIF(D871:D893 not equal to ABC,DEF,GHI)

Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
On 2002-09-06 11:53, Stubbi wrote:
I'm new to the board and could use some help here...I have a column that is populated with 3 letter codes IE.. ABC,DEF,GHI etc.. I am using =COUNTIF(D871:D893,"ABC") to return all cells in the column that = ABC and others.. I want to be able to count all the other 3 letter codes besides ABC,DEF,GHI.. And am having a world of trouble...Can anyone help.
In laymans terms this is what I would like.
=COUNTIF(D871:D893 not equal to ABC,DEF,GHI)

Thanks

=SUMPRODUCT(NOT(ISNUMBER(MATCH(D871:D893,{"ABC","DEF","GHI"},0)))+0)

You can also have ABC, DEF, etc. in a range like A1:C1 and use that range instead of {"ABC","DEF","GHI"}.
 
Upvote 0
Another variation:

=COUNTA(A:A)-COUNTIF(A1:A20,"=ABC")-COUNTIF(A1:A20,"=DEF")-COUNTIF(A1:A20,"=GHI")
 
Upvote 0

Forum statistics

Threads
1,214,883
Messages
6,122,077
Members
449,064
Latest member
MattDRT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top