Forumla for if unique text, then count

Moomin_dragon

New Member
Joined
Nov 17, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello,
I have a spreadsheet of people, with a status column, an assigned staff member and a postcode column. I want to know how many are at each status by household (not individual), but also my the staff member. E.g, how many households are at awaiting interview (status) for Joe Bloggs (assigned staff member). I have tried combining a working COUNTA unique formula with the working COUNTIFS, and many other combinations but I am getting nowhere, can anybody help? Separate formulas.

=COUNTIFS(Applicants!O1:O156,"<>",Applicants!K1:K156,(C5))

=COUNTA(UNIQUE(Applicants!J2:J100))
OR
=SUMPRODUCT(((Applicants!J2:J168<>"")/COUNTIF(Applicants!J2:J168, Applicants!J2:J168 &"")))

Thanks in advance
Beth
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Maybe
Excel Formula:
=COUNTA(UNIQUE(FILTER(Applicants!J2:J100,(Applicants!O1:O156<>")*(Applicants!K1:K156=C5))))
 
Upvote 0
When I copied your formulas, I hadn't noticed that the ranges were inconsistent. I've fixed that and changed it so that it doesn't give an incorrect count of 1 when there are no rows that meet the criteria.
This will count unique records in column J where column O is not blank and column K is equal to C5, which is how I understood the requirement from the first 2 formulas in your question.
Excel Formula:
=IFERROR(ROWS(UNIQUE(FILTER(Applicants!J1:J156,(Applicants!O1:O156<>")*(Applicants!K1:K156=C5)))),0)
 
Upvote 0
Solution
When I copied your formulas, I hadn't noticed that the ranges were inconsistent. I've fixed that and changed it so that it doesn't give an incorrect count of 1 when there are no rows that meet the criteria.
This will count unique records in column J where column O is not blank and column K is equal to C5, which is how I understood the requirement from the first 2 formulas in your question.
Excel Formula:
=IFERROR(ROWS(UNIQUE(FILTER(Applicants!J1:J156,(Applicants!O1:O156<>")*(Applicants!K1:K156=C5)))),0)
That's done it. Thank you so much!
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,093
Latest member
catterz66

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