How to count unique values with few criterias between two lists/ Count the number of duplicates with few criterias bwtween two lists

jychuah

New Member
Joined
Jul 27, 2017
Messages
1
For example, I have two list, each with three columns of criteria. From here I want to find the number of unique customer ID that bought orange on Wednesdays.


List 1

Customer ID (Column A)Items bought (Column B)Day (Column C)
1OrangeWednesday
2AppleTuesday
5PearWednesday
5OrangeWednesday

<tbody>
</tbody>

List 2

Customer ID (Column E)Items bought (Column F)Day (Column G)
5OrangeWednesday
6OrangeFriday
4PearThursday
2OrangeWednesday
3Orange Wednesday

<tbody>
</tbody>
I have tried the approach of minus off the duplicates by using the formula below to count the duplicates:
=SUM(IF(((F2:F6="Topup")*(G2:G6="Pass")),1/COUNTIFS(E2:E6,A2:A5,B2:B5,"Topup",C2:C5,"Pass"),0))
However, it does not work well and it gives me DIV/0! error.

Can anyone please help me with this approach or suggest me a new approach?


Many thanks,
jy
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,217,125
Messages
6,134,768
Members
449,888
Latest member
webarnes99

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