We help IT Professionals succeed at work.

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

138 Views
Last Modified: 2017-03-07
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
Comment
Watch Question

ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Hi,

Sample workbook would be helpful.
CERTIFIED EXPERT

Commented:
hmm ... why pivot ?

select A,count(B) from table group by A
Managing Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
CERTIFIED EXPERT

Commented:
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))

Author

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.
CERTIFIED EXPERT

Commented:
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.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions