How to count the number of customers ordering at an item - pivot table

Column A: - Unique identification number of product
Column B: Departments ordering

I would like to count the number of  departments ordering  a unique product in Colum A
Lyndall BradleyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ShumsExcel & VBA ExpertCommented:

Sample workbook would be helpful.
hmm ... why pivot ?

select A,count(B) from table group by A
ShumsExcel & VBA ExpertCommented:
Probably like this?
You can filter the ID's and pivot will list the count as per department.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ensure Business Longevity with As-A-Service

Using the as-a-service approach for your business model allows you to grow your revenue stream with new practice areas, without forcing you to part ways with existing clients just because they don’t fit the mold of your new service offerings.

oups : missed the excel part ;) sorry
if you need a formula for a specific product, something like this should do : count(if(A1:A100 = "myproduct",B1:B100))
Lyndall BradleyAuthor Commented:
Thank-you for your replies.

The attached workbook. I would like to know how many times the customers in Colum B orders column A. Thank-you for your time and assistance.
you'd need to replace the "sum" by a "count" in the calculated data ( or add an extra column ).
click on the pivot and find where you can add a new "value" or "set of values" which will actually ask for the type of value ( sum, count, count unique ... ) and add the corresponding extra column.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.