Count Unique Names with Criteria

shawnw

New Member
Joined
Apr 6, 2016
Messages
34
Hello,

I'm really struggling with this one. I read a few articles and even watched a video, but it's not working out for me.


  • I have a list of team members (e.g., Joe, Mary, Bill) in Col A.
  • Each name appears once in the list. No name is repeated.
  • For each name, I have a cell with the number of hours that person worked (e.g., 0, 1, 2...infinity).
  • I am trying to get a count of the names where the number of hours is greater than zero.

[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]COL A[/TD]
[TD="align: center"]COL B[/TD]
[/TR]
[TR]
[TD]R1[/TD]
[TD]Name[/TD]
[TD]Hours[/TD]
[/TR]
[TR]
[TD]R2[/TD]
[TD]Andy[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]R3[/TD]
[TD]Bill[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]R4[/TD]
[TD]Charlie[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]R5[/TD]
[TD]David[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]R6[/TD]
[TD]Edward[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]R7[/TD]
[TD]Frank[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]R8[/TD]
[TD]George[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]R9[/TD]
[TD]Harry[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]R10[/TD]
[TD]Ian[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]R11[/TD]
[TD]Jack[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]


In the example above, I have 10 unique names. Of these, 3 have zero hours and should be excluded. Seven have hours > 0 and should be counted.

So now in a separate worksheet I need a formula that results in "7" (indicting that 7 unique names had greater than 0 hours).

Thanks!
 
I think I got it!

=SUM(--(FREQUENCY(IF(People[Total Effort]>0,MATCH(People[VersionOne User],People[VersionOne User],0)),ROW(People[VersionOne User])-ROW(People!A2)+1)>0))
 
Upvote 0
As there are no duplicates, you can use a simpler formula

=COUNTIF(Sheet1!B2:B11,">0")

M.
 
Upvote 0

Forum statistics

Threads
1,226,889
Messages
6,193,527
Members
453,805
Latest member
Daniel OFlanagan

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