Count unique agent names based on the criteria

jaymisra

New Member
Joined
Nov 26, 2023
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,

I am struggling to get the unique agent counts for the data set I have. Need your help

The table contains week number, agent name and survey outcome. I want to know unique count of agents who have error free outcome. As you can see from the data an agent can have possible outcomes as error free, critical error, non critical error. As you can see both Zara and Laura has error free responses so the count ll be 2. What will be formula to achieve that. Thanks
 

Attachments

  • Screenshot_2023-11-26-21-18-13-80_96b26121e545231a3c569311a54cda96.jpg
    Screenshot_2023-11-26-21-18-13-80_96b26121e545231a3c569311a54cda96.jpg
    173.7 KB · Views: 14

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
MAybe this way
change the ranges to suit your requirements
Excel Formula:
=SUM(--(LEN(UNIQUE(FILTER($B$2:$B$11,$C$2:$C$11="error free","")))>0))
 
Upvote 0
Thanks Michael

getting this error Error filter has mismatched range sizes. Expected row count 10: column count: 1. Actual row count: 1,column count: 1
 
Upvote 0
Possibility?
Book1
ABCDE
1WeekAgentResponse
246Joeerror freeCount:2
346Joeerror free
446Zaraerror free
546Lauraerror free
646Lauraerror free
746Zaraerror free
846JoeCritical error
946Joenon-critical error
1046Zaraerror free
1146Lauraerror free
Sheet1
Cell Formulas
RangeFormula
E2E2=ROWS(UNIQUE(FILTER($B$2:$B$11,($C$2:$C$11="error free"))))-ROWS(UNIQUE(FILTER($B$2:$B$11,($C$2:$C$11="Critical error")+($C$2:$C$11="non-critical error"))))
 
Upvote 0
Thanks Kevin

It is working in an ideal scenario where you would expect to have possible mixture of the outcome but when we have scenarios like attached it gives the incorrect answers.

Is there a way to look at agent name and there outcomes and if it has all error free responses count that agent ONLY. See attached with 2 different scenarios. Thanks
 

Attachments

  • IMG_20231126_222802.jpg
    IMG_20231126_222802.jpg
    239.3 KB · Views: 7
  • Screenshot_2023-11-26-22-27-02-98_f90b96e7af3c5a594eb0c92de7fc5fe1.jpg
    Screenshot_2023-11-26-22-27-02-98_f90b96e7af3c5a594eb0c92de7fc5fe1.jpg
    233.5 KB · Views: 6
Upvote 0
There's probably a more elegant solution, but try this out:
Book1
ABCD
1WeekAgentResponse
246Joeerror free
346Joeerror free
446Zaraerror free
546Lauraerror free
646Lauraerror free
746Zaraerror free
846Joeerror free
946Joeerror free
1046Zaraerror free5
1146Lauraerror free
1246Johnerror free
1346Alexerror free
14
15WeekAgentResponse
1646Joeerror free
1746Joeerror free
1846Zaraerror free
1946Lauraerror free
2046LauraCritical error
2146Zaraerror free
2246Joeerror free
2346Joeerror free
2446Zaraerror free2
2546Lauraerror free
2646Johnerror free
2746AlexCritical error
28
Sheet1
Cell Formulas
RangeFormula
D10D10=IFERROR(ROWS(UNIQUE(FILTER($B$2:$B$13,($C$2:$C$13="error free")))),0)-IFERROR(ROWS(UNIQUE(FILTER($B$2:$B$13,($C$2:$C$13="Critical error")+($C$2:$C$13="non-critical error")))),0)
D24D24=IFERROR(ROWS(UNIQUE(FILTER($B$16:$B$27,($C$16:$C$27="error free")))),0)-IFERROR(ROWS(UNIQUE(FILTER($B$16:$B$27,($C$16:$C$27="Critical error")+($C$16:$C$27="non-critical error")))),0)
 
Upvote 0
It looks like second scenerio should have had 3 as the unique count of agents with error free responses but it returned 2. Is there any work around where it addresses all possible outcomes and then counts Only unique agents with error free responses. Thanks again
 
Upvote 0
Sorry, I've tried all sorts of combinations, including:

=IFERROR(ROWS(UNIQUE(FILTER($B$2:$B$13,ISNUMBER(SEARCH(" e",$C$2:$C$13))=FALSE))),0)
=IFERROR(ROWS(UNIQUE(FILTER($B$16:$B$27,ISNUMBER(SEARCH(" e",$C$16:$C$27))=FALSE))),0)-IFERROR(ROWS(UNIQUE(FILTER($B$16:$B$27,ISNUMBER(SEARCH(" e",$C$16:$C$27))=TRUE))),0)
=COUNTA(UNIQUE(FILTER(B16:B27,ISNUMBER(SEARCH(" e",C16:C27))=FALSE)))

all to no avail. I'll have to leave this one to the formula experts :unsure:
 
Upvote 0

Forum statistics

Threads
1,215,092
Messages
6,123,063
Members
449,090
Latest member
fragment

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