Formula for Distinct text values based on other criteria

esmarques

New Member
Joined
Oct 27, 2020
Messages
34
Office Version
  1. 365
Platform
  1. MacOS
Hello,
I am trying to find how to show the number of distinct Artists and Staff in the file attached. I have manage to find the distinct number of people as a whole but coudn't do it when try to add fiuther criterias to find out the number of distinct staff or artist.
Any help is welcomed.

Number of distinct people.xlsx
ABC
1 name artist staff
2MikeTRUE
3JohnTRUE
4AmandaTRUE
5MikeTRUE
6MikeTRUE
7HollyTRUE
8JohnTRUE
9MikeTRUE
10HollyTRUE
11DanTRUE
12
13
14
15Distinct People5
16Distinct Artists (should be 2)
17Distinct Staff(should be 3)
Sheet1
Cell Formulas
RangeFormula
B15B15=SUM(IF(ISTEXT(A2:A11),1/ COUNTIF(A2:A11,A2:A11),””))


Thank you
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
How about
Fluff.xlsm
ABC
1 name artist staff
2MikeTRUE
3JohnTRUE
4AmandaTRUE
5MikeTRUE
6MikeTRUE
7HollyTRUE
8JohnTRUE
9MikeTRUE
10HollyTRUE
11DanTRUE
12
13
14
15Distinct People5
16Distinct Artists2 (should be 2)
17Distinct Staff3(should be 3)
Sheet7
Cell Formulas
RangeFormula
B15B15=SUM(IF(ISTEXT(A2:A11),1/ COUNTIF(A2:A11,A2:A11),””))
B16B16=ROWS(UNIQUE(FILTER(A2:A11,B2:B11=TRUE)))
B17B17=ROWS(UNIQUE(FILTER(A2:A11,C2:C11=TRUE)))
 
Upvote 0
Solution
Excel Formula:
=TRANSPOSE(BYCOL(B2:C11,LAMBDA(x,ROWS(UNIQUE(FILTER(A2:A11,x))))))
 
Upvote 0
How about
Fluff.xlsm
ABC
1 name artist staff
2MikeTRUE
3JohnTRUE
4AmandaTRUE
5MikeTRUE
6MikeTRUE
7HollyTRUE
8JohnTRUE
9MikeTRUE
10HollyTRUE
11DanTRUE
12
13
14
15Distinct People5
16Distinct Artists2 (should be 2)
17Distinct Staff3(should be 3)
Sheet7
Cell Formulas
RangeFormula
B15B15=SUM(IF(ISTEXT(A2:A11),1/ COUNTIF(A2:A11,A2:A11),””))
B16B16=ROWS(UNIQUE(FILTER(A2:A11,B2:B11=TRUE)))
B17B17=ROWS(UNIQUE(FILTER(A2:A11,C2:C11=TRUE)))
It worked perfectly! Thank you very much.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

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