Countif multiple criteria

Michael Joiner

New Member
Joined
Aug 17, 2010
Messages
2
I've tried some different countif formulas and array formulas, without success. I need a formula that says COUNTIF A2:A399 is NOT equal to "DETROIT" and is NOT equal to "PHILADELPHIA". Please help.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
simproduct is one option, but you can stick to countif only:

=398 - countif(A2:A399,"<>DETROID")-countif(A2:A399,"<>PHILLY")
 
Upvote 0
Cant you just use COUNTIFS?

=COUNTIFS(A2:A399,"<>DETROIT",A2:A399,"<>PHILADELPHIA")
 
Upvote 0
It depends on which version of excel Michael is using; i don't believe 'Countifs' was introduced until the 07 version of excel. If he's on 03, then the first response (sumproduct()) is the way i would go.
 
Upvote 0
I've tried some different countif formulas and array formulas, without success. I need a formula that says COUNTIF A2:A399 is NOT equal to "DETROIT" and is NOT equal to "PHILADELPHIA". Please help.

Just enter:

=COUNTIF(A2:A399,"?*")-SUM(COUNTIF(A2:A399,{"DETROIT","PHILADELPHIA"}))
 
Upvote 0
Thank you very much for both examples (SUMPRODUCT, and COUNTIFS). I have 2003 at home and 2007 at work, so both are valuable. Mr Excel is my new BFF!
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,739
Members
448,989
Latest member
mariah3

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