Count/frequency of unique values based on TWO criteria sets

Decoco

New Member
Joined
May 31, 2018
Messages
4
I have a gargantuan list of orders by item for each customer:

Customer A - Item Z - Q1 - Order 1
Customer A - Item Z Q2 - Order 2
Customer A - Item Y - Q5- Order 3
Customer B - Item Z - Q1- Order 4
Customer B - Item W- Q2- Order 5
Customer B - Item W- Q4- Order 6

I want the number of times each customer has ordered each item, said another way: the number of times each item was ordered, by customer.

I feel like maybe I'm halfway there bc I can find the number of times an item was purchased using a formula something like this, for ex (CSE).:

{=SUM(--FREQUENCY(IF(static item range= dynamic item in specific row, order range) order range)>0))}

But the items are not specific to customer so this returns a count/frequency of every order of that item by any customer in the range. I could use this to also get a count of how many times each customer orders, etc. But I do not want the total number of times each customer ordered and I do not want the total number of times each item has been ordered and that information doesn't keep me with a data set so large.

I tried to add an AND function or second IF logic test to specify I want the order number to be specific to BOTH the ITEM AND CUSTOMER but kept getting a: #value . I was thinking of trying a sumif formula to specify that the order range is dependent on the customer. I don't know of that will work yet, I feel like that might be too many arguments.

The size of the data and the precise numbers needed are not really very suitable for a pivot table.

I'm sure there's more than one way to do this. Please help me!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Expected answers in "":

Customer A - Item Z - Q1 - Order 1-'"2"
Customer A - Item Z Q2 - Order 2 - "2"
Customer A - Item Y - Q5- Order 3 - "1"
Customer B - Item Z - Q1- Order 4 - "1"
Customer B - Item W- Q2- Order 5- "2"
Customer B - Item W- Q4- Order 6- "2"
 
Upvote 0
I suppose Customers (A, B, etc.) are all in one column, Items (Z, Y, W, etc.) in another column, Q values (Q1, Q2, etc.) yet in another column, and Orders (Order 1, Order 2, etc.) also in a column of their own. Is this correct?
 
Upvote 0

Row\Col
A​
B​
C​
D​
E​
2​
Customer AItem ZQ1Order 1
2​
3​
Customer AItem ZQ2Order 2
2​
4​
Customer AItem YQ5Order 3
1​
5​
Customer BItem ZQ1Order 4
1​
6​
Customer BItem WQ2Order 5
2​
7​
Customer BItem WQ4Order 6
2​

In E2 enter and copy down:

=COUNTIFS($A$2:$A$7,$A2,$B$2:$B$7,$B2)
 
Upvote 0

Forum statistics

Threads
1,214,665
Messages
6,120,804
Members
448,990
Latest member
rohitsomani

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
Back
Top