Count with two criteria

ibf

New Member
Joined
Sep 29, 2006
Messages
18
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.

Please Help. ibf
 

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
Joined
Jun 20, 2002
Messages
8,010
Office Version
  1. 365
Try:

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

Or, consider using a pivot table.
 

ibf

New Member
Joined
Sep 29, 2006
Messages
18
Thanks Oaktree
That worked. I new I was close. Thanks for your help.
ibf
 

Forum statistics

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