Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

Answered I received in the Google Support Forum:

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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