Countif Unique Values

Velven

New Member
Joined
Nov 30, 2017
Messages
37
Hello !

I am trying to make a counting for unique value on the same date.
I've seen several formulas here and it's too complex for me to understand :(.

Staff record ( Sheet 1 )
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Date[/TD]
[TD]Staff[/TD]
[TD]Dep Quantity[/TD]
[TD]Wa Quantity[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]12/1/2017[/TD]
[TD]Alex[/TD]
[TD]Expected value
1[/TD]
[TD]Expected Value
1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12/1/2017[/TD]
[TD]John[/TD]
[TD]Expected Value
2[/TD]
[TD]Expected Value
0[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]12/2/2017[/TD]
[TD]Alex[/TD]
[TD]Expected Value
1[/TD]
[TD]Expected Value 0[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]12/2/2017[/TD]
[TD]John[/TD]
[TD]Expected Value 0[/TD]
[TD]Expected Value 1[/TD]
[/TR]
</tbody>[/TABLE]

Customers Record ( Sheet 2 )
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Date[/TD]
[TD]Customers[/TD]
[TD]Dep or Wa[/TD]
[TD]Staff[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]12/1/2017[/TD]
[TD]Cust A[/TD]
[TD]Dep[/TD]
[TD]Alex[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12/1/2017[/TD]
[TD]Cust A[/TD]
[TD]Wa[/TD]
[TD]Alex[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]12/1/2017[/TD]
[TD]Cust A[/TD]
[TD]Dep[/TD]
[TD]Alex[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]12/1/2017[/TD]
[TD]Cust B[/TD]
[TD]Dep[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]12/1/2017[/TD]
[TD]Cust C[/TD]
[TD]Dep[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]12/2/2017[/TD]
[TD]Cust C[/TD]
[TD]Wa[/TD]
[TD]John[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]12/2/2017[/TD]
[TD]Cust D[/TD]
[TD]Dep[/TD]
[TD]Alex[/TD]
[/TR]
</tbody>[/TABLE]

So what I'm trying to do is under C2:E5 must be filled in with the values shown on Sheet 2.

C2 must check date on both sheet if matches , check staff on both sheets , Check if it's a Dep or Wa. Check if it's a Unique Customer for the current date.

Dep and Wa must be separate. Meaning Unique Wa count and Unique Dep count , only unique for the same date.


If anybody even understand what I'm trying to do :confused:. I suck at explaining. But it's too complex for me to make a formula.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try:
These are array formulas and must be entered with CTRL-SHIFT-ENTER.

Drag formulas down column as needed.

Excel Workbook
ABCD
1DateStaffDep QuantityWa Quantity
212/1/2017Alex11
312/1/2017John20
412/2/2017Alex10
512/2/2017John01
Sheet1
Excel Workbook
ABCD
1DateCustomersDep or WaStaff
212/1/2017Cust ADepAlex
312/1/2017Cust AWaAlex
412/1/2017Cust ADepAlex
512/1/2017Cust BDepJohn
612/1/2017Cust CDepJohn
712/2/2017Cust CWaJohn
812/2/2017Cust DDepAlex
Sheet2
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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