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

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,431
Messages
5,837,199
Members
430,484
Latest member
himaruasuka

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