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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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

[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][td]
E​
[/td][/tr][tr][td]
2​
[/td][td]Customer A[/td][td]Item Z[/td][td]Q1[/td][td]Order 1[/td][td]
2​
[/td][/tr]
[tr][td]
3​
[/td][td]Customer A[/td][td]Item Z[/td][td]Q2[/td][td]Order 2 [/td][td]
2​
[/td][/tr]
[tr][td]
4​
[/td][td]Customer A[/td][td]Item Y[/td][td]Q5[/td][td]Order 3 [/td][td]
1​
[/td][/tr]
[tr][td]
5​
[/td][td]Customer B[/td][td]Item Z[/td][td]Q1[/td][td]Order 4 [/td][td]
1​
[/td][/tr]
[tr][td]
6​
[/td][td]Customer B[/td][td]Item W[/td][td]Q2[/td][td]Order 5[/td][td]
2​
[/td][/tr]
[tr][td]
7​
[/td][td]Customer B[/td][td]Item W[/td][td]Q4[/td][td]Order 6[/td][td]
2​
[/td][/tr]
[/table]


In E2 enter and copy down:

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

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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