Counting Unique names only, based on a couple of criteria

dixiebritt

Board Regular
Joined
Jan 8, 2014
Messages
63
QuarterSRClient
q1janeabc company
q1janemcg inc
q1janemcg inc
q1housebox llc
q1bobhti
q2bobhti
q2bobapple
q2janeabc company

<tbody>
</tbody>

I have this set of data. I want to do two things:
1. calculate the number of total unique clients by Quarter and SR
2. calculate the number of total unique clients by Quarter only
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try:

ABCDEFGHIJK
1QuarterSRClientQuarterSR# Unique ClientsQuarter# Unique Clients
2q1janeabc companyq1Jane2q24
3q1janemcg inc
4q1janemcg inc
5q1housebox llc
6q1bobhti
7q2bobhti
8q2bobapple
9q2janeabc company

<tbody>
</tbody>
Sheet4

Array Formulas
CellFormula
G2{=SUM(SIGN(FREQUENCY(IF($A$2:$A$9=E2,IF($B$2:$B$9=F2,MATCH($C$2:$C$9,$C$2:$C$9,0))),ROW($C$2:$C$9)-ROW($C$2)+1)))}
J2{=SUM(SIGN(FREQUENCY(IF($A$2:$A$9=I2,MATCH($C$2:$C$9,$C$2:$C$9,0)),ROW($C$2:$C$9)-ROW($C$2)+1)))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Last edited:
Upvote 0
Eric,

The formula in J2 seems perfect to me but i think it should return 3, not 4 - maybe you have pasted the wrong cell.

M.
 
Upvote 0

A
B
C
D
E
F
G
H
I
J
1
Quarter​
SR​
Client​
Quarter​
SR​
# Unique Clients​
Quarter​
# Unique Clients​
2
q1​
jane​
abc company​
q1​
Jane​
2​
q2​
3​
3
q1​
jane​
mcg inc​
4
q1​
jane​
mcg inc​
5
q1​
house​
box llc​
6
q1​
bob​
hti​
7
q2​
bob​
hti​
8
q2​
bob​
apple​
9
q2​
jane​
abc company​
10

<tbody>
</tbody>


Array formulas in G2 and J2 provided by Eric in post 2.

M.
 
Last edited:
Upvote 0
Good catch Marcelo. After I posted the formulas, I noticed that the J2 formula was pointing to the wrong cell, so I fixed it. But I didn't fix the result cell, so that's why it shows incorrectly. Thanks for the assist.
 
Upvote 0

Forum statistics

Threads
1,214,839
Messages
6,121,887
Members
449,057
Latest member
Moo4247

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