Formula Help

jeefreak

New Member
Joined
Mar 10, 2009
Messages
35
Hi,

I have a table with a list of names and account status. Names might show up multiple times due to multiple accounts. I want to try and obtain the number of persons with all accounts closed.

Name | Status

PersonA | Closed
PersonA | Open
PersonA | Closed
PersonB | Closed
PersonB | Closed
PersonC | Open
PersonD | Closed

In the example above, it should come up with 2 (PersonB and PersonD). I can only think of complicated and manual procedures to do this. Is there a simple formula that would calculate this?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Code:
      ---A--- --B--- ----C-----
  1    Name   Status           
  2   PersonA Closed           
  3   PersonA Open             
  4   PersonA Closed           
  5   PersonB Closed All closed
  6   PersonB Closed All closed
  7   PersonC Open             
  8   PersonD Closed All closed

In C2 and down,

=IF(COUNTIFS($A$2:$A$8, A2, $B$2:$B$8, "<>Closed"), "", "All closed")
 
Upvote 0
Maybe this Array-formula

=SUM(IF(COUNTIF(OFFSET($A$2,,,ROW($A$2:$A$8)-ROW($A$2)+1,1),$A$2:$A$8)=1,IF(COUNTIF($A$2:$A$8,$A$2:$A$8)=COUNTIFS($A$2:$A$8,$A$2:$A$8,$B$2:$B$8,"Closed"),1)))

Ctrl+Shift+Enter
(hold down both Ctrl and Shift keys and hit Enter)

M.
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,628
Members
452,933
Latest member
patv

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