Unique values with two criteria in one column

leadsmith

New Member
Joined
Aug 17, 2018
Messages
3
Hi,
I really need your help!
I'm trying to count the unique values in column A that meet two criteria that are in column K. I have over 673 employees that did a communication or support. I want a number that counts the employees that did a communication and support.

Column A- employee #
Column K- Communication or Support

Criteria 1: communication & criteria 2: support

Please help and thank you!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
namecommsupp
name1Y
name2Y
name3Y
name4YY
name5
name6Y
name7Y
name8Y
name9YY
name104
name11Y
name12=SUMPRODUCT((B2:B21="Y")*(C2:C21="Y")*1)
name13
name14Y
name15YY
name16Y
name17Y
name18Y
name19Y
name20YY

<colgroup><col width="64" span="13" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
this is how I have it set up
AB
employee#Care
3816support
3816communication
3824communication
3828support
3830support
3841support
3890support
3890communication
3890support

<tbody>
</tbody>

I want to count the unique number of employees that did a support and communication.
 
Upvote 0
I do not see immediatly a formula to do the job so here an UDF
Assuming data from A1 to B10
Somewhere put =Counting(A2:B10)

Code:
Option Explicit


Function Counting(WkRg As Range) As Integer
Dim EmpDic   As Object
Set EmpDic = CreateObject("Scripting.Dictionary")
Dim EmNbpDic   As Object
Set EmNbpDic = CreateObject("Scripting.Dictionary")
Dim Rg   As Range
    With EmpDic
        For Each Rg In WkRg.Columns(1).Cells
            If (.exists(Rg.Value)) Then
                If (Rg(1, 2) <> .Item(Rg.Value)) Then
                    EmNbpDic.Item(Rg.Value) = Empty
                End If
            Else
                EmpDic.Item(Rg.Value) = Rg(1, 2).Value
            End If
        Next Rg
    End With
    Counting = EmNbpDic.Count
End Function
 
Upvote 0
sort your data into employee ascending then count the number of occasions when employee number equals the number above it
 
Upvote 0
this is how I have it set up
AB
employee#Care
3816support
3816communication
3824communication
3828support
3830support
3841support
3890support
3890communication
3890support

<tbody>
</tbody>

I want to count the unique number of employees that did a support and communication.

Control+shift+enter, not just enter:

=SUM(IF(FREQUENCY(IF(ISNUMBER(MATCH($B$2:$B$10,{"communication","support"},0)),$A$2:$A$10),$A$2:$A$10),1))
 
Upvote 0
employee#Care
3816support
3816communication
3824communication
3828support
3830support
3841support
3890support
3890communication
3890support
Count of CareCare
employee#communicationsupportGrand Total
3816112
382411
3828 11
3830 11
3841 11
3890123
Grand Total369
count grand totals > 1

<colgroup><col><col><col span="5"><col><col span="2"><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,028
Members
448,940
Latest member
mdusw

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