I am having trouble writing a function for this need (in Google spreadsheets):

I have 2 columns A and B.

I want to be able to get a percentage based on those two columns. I want to count the number of times a specific value is found in A and only if B has a certain value in it.


  A       B
name1    yes
name2    no
name7    no
name1    yes
name1    no
name2    yes

I would like to function to only give me the percentage of times name1 is found when it is associated with a yes in column B.

If you need any more information and clarification, let me know.

2 Answers 2


Answered I received in the Google Support Forum:


With the A value (eg "name1") held in say C1 and the B value (eg "yes") in say D1 then:


is shorter and more versatile.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.