Compound countif statement

mikeconstantino

New Member
Joined
Nov 26, 2005
Messages
20
Hello, I need some assistance with a countif, or a better formula to use. I want to count all the items in column D that match "Customer" only if the range in column I matches "New England". Any assistance would be appreciated.


COUNTIF(I2:I201, "*"&"New England"&"*"),(D2:D201, "*"&"Customer"&"*"))
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hello, I need some assistance with a countif, or a better formula to use. I want to count all the items in column D that match "Customer" only if the range in column I matches "New England". Any assistance would be appreciated.


COUNTIF(I2:I201, "*"&"New England"&"*"),(D2:D201, "*"&"Customer"&"*"))
Try one of these...

Use cells to hold the criteria:

A2 = Customer
B2 = New England

If you're using Excel 2007 or later:

=COUNTIFS(D2:D201,"*"&A2&"*",I2:I201,"*"&B2&"*")

This one will work in all versions of Excel:

=SUMPRODUCT(--(ISNUMBER(SEARCH(A2,D2:D201))),--(ISNUMBER(SEARCH(B2,I2:I201))))
 
Upvote 0
There is not much to be added after Biff's recommedation.
I would rather make my ranges absolute($$) but unless you will not drag your formulas down or accross T.Valko examples are ideal.
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

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