Hi,

Long-time Excel user but fairly new to the statistical functions. Have a bit of a dilemma that I hope someone can help me with.

I have a spreadsheet that consists of several hundred (will eventually be about 10,000) companies and the types of products they manufacture. It is sorted by customer number, which is unique for each company. Most companies have more than one line in the spreadsheet (many may have up to 30 lines), because they manufacture the same type of product under more than one brand name AND/OR because they manufacture two or more different types of products.

Simplified example:

Customer Number Brand Type
1 A VACUUM CLEANERS
1 A TOASTERS
1 B VACUUM CLEANERS
1 C AIR CONDITIONERS
2 D TOASTERS
3 E AIR CONDITIONERS
4 F AIR CONDITIONERS
4 F TOASTERS
4 G TOASTERS

and so on.

What I would like to do is figure out how many of these companies, of the total number, manufacture a given product type, like toasters for example. If I do a straight COUNTIF on the type column, it will return 4 which is not correct. 3 of the 4 companies manufacture toasters, but since it's listed twice under company 4 (due to two different brand names) that will throw off the numbers. I need it to screen out this type of duplicate entry and return a value of 3.

I guess what I need is a formula that will assess all of company #1's entries, if "TOASTERS" is listed it counts as true, if there's no listing it counts as false, then it moves on to company #2's entry and so on.

I have looked all through Excel help and all over the Internet with no luck. Please help!

Thanks.