count unique values if range meets criteria

alirulez

New Member
Joined
Jul 4, 2015
Messages
35
Hello

Hope you can help me out of this conundrum

I have a list constructed as follows

User ID
TypePhone Numbers
2231
Incoming
01159796555
2231
Outgoing
01159796553
2296
Local
01159795983
2231
Toll
01159796523
3400
Outgoing
01159796123

<tbody>
</tbody>

Id like a formula which returns the number of unique Phone numbers, if the User ID is 2231, and If the Type is Not Incoming.

Ive tried a number of options with SumProduct and Count Ifs etc, but all have ended in failure

Best
Ali
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Here are some formula ways.
Both are array formulas that must be entered with CTRL-SHIFT-ENTER.

Formula in B11 can only be used if phone numbers are numeric. Formula in B10 will work with either numeric are teat values.
Both of these formulas assume there will be no blanks in the phone number column. If there could be blanks we will need to add another IF statement in the formula.
Excel Workbook
ABC
1User IDTypePhone Numbers
22231Incoming1159796555
32231Outgoing1159796553
42296Local1159795983
52231Toll1159796523
63400Outgoing1159796123
72231Outgoing1159796553
8
9User ID2231
10Count2If Phone # is text
112If Phone # is numeric
Sheet
 
Upvote 0
A
B
C
D
E
1
User IDTypePhone Numbers
2
2231​
Incoming
1159796555​
2​
3
2231​
Outgoing
1159796553​
4
2296​
Local
1159795983​
5
2231​
Toll
1159796523​
6
3400​
Outgoing
1159796123​

<tbody>
</tbody>


E2=SUM(IF(FREQUENCY(IF(A2:A6=A2,IF($B$2:$B$6<>B2,C2:C6)),C2:C6),1)) control+shift+enter
 
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,305
Members
449,079
Latest member
juggernaut24

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