# Count with two criteria

#### ibf

##### New Member
Hi everybody

I can't seem to figure out how to do a count from two columns with specific criteria. Here goes.
I have one column with city names(A) and several other columns (B - D) with areas of service. Some of the service column may or may not have amounts in them.

A B C D
1 City Furniture Carpets Area Rugs
2 Cobourg \$ 140.00
3 Ajax \$ 89.00
4 Pickering
5 Cobourg \$ 234.00

What I would like to find out is the count for each city for each service.
ei Cobourg should return 2 for furniture

I've tried =SUMPRODUCT((\$A\$2:\$A\$5="Cobourg")*((B2:B5=">1"))
I've also tried various Countif formulas.

### Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

#### Oaktree

##### MrExcel MVP
Try:

=SUMPRODUCT((\$A\$2:\$A\$5="Cobourg")*((B2:B5>1))

Or, consider using a pivot table.

#### ibf

##### New Member
Thanks Oaktree
That worked. I new I was close. Thanks for your help.
ibf

Replies
1
Views
80
Replies
0
Views
165
Replies
2
Views
117
Replies
2
Views
175
Replies
6
Views
332

1,136,601
Messages
5,676,732
Members
419,648
Latest member
jmuench

### 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.

### Which adblocker are you using?

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

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