1

I have a column of names and a column called is broke rules. If a person has broken a rule once, then their rule breaking status is yes otherwise they are not a rule breaker. I know how I would do this programmatically in python or something, but how do I check their actual rule breaking status in excel?

name broke rule
bob no
bob no
jane no
sam yes
jane yes
jake no
bob yes
paul no

The result I want

name broke rule rule breaking status
bob no yes
bob no yes
jane no yes
sam yes yes
jane yes yes
jake no no
bob yes yes
paul no no
jake no no

As you can see only jake and paul have a no status for their rule breaking, because they have not broken the rule once, while the others have broken a rule at least once before.

2 Answers 2

1

Use COUNTIFS:

=IF(COUNTIFS(A:A,A2,B:B,"yes"),"yes","no")

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

If your Excel version is older than 2010 you can do:

=IF(SUMPRODUCT(--(A$2:A$10=A2),--(B$2:B$10="yes"))=1,"yes","no")

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.