***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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,203
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"}.
 

Corticus

Well-known Member
Joined
Apr 30, 2002
Messages
1,579
Another variation:

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

Stubbi

New Member
Joined
Sep 5, 2002
Messages
2
Eureka....It works...Thanks for the help....

Have a great weekend...

S
 

Watch MrExcel Video

Forum statistics

Threads
1,130,102
Messages
5,640,115
Members
417,126
Latest member
Jeffman52

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
Top