Avatar of Lyndall Bradley
Lyndall Bradley
 asked on

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
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
skullnobrains

8/22/2022 - Mon
Shums Faruk

Hi,

Sample workbook would be helpful.
skullnobrains

hmm ... why pivot ?

select A,count(B) from table group by A
ASKER CERTIFIED SOLUTION
Shums Faruk

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
skullnobrains

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))
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Lyndall Bradley

ASKER
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.
skullnobrains

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.