View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bondi Bondi is offline
external usenet poster
 
Posts: 94
Default how to count if one column has email and another column has yes


nested functions wrote:
In one column, i have "email" and in another column i have "yes", "no". I
want to count how many have done email, that is yes and how many have not
done email that is no.

please help me in using the appropriate function,,,,


Hi,

One way to count all the instances of "email" and "yes" is to use:
(Asuming your data is in A1:B10)

=SUMPRODUCT(--(A1:A10="email"),--(B1:B10="yes"))

and "email" and "no"

=SUMPRODUCT(--(A1:A10="email"),--(B1:B10="no"))

If there is "email" in all the rows in column A and you just want to
count "yes" and "no" in column B then maybe you can use:

For "yes" count:
=COUNTIF(B1:B10,"=yes")

For "no" count:
=COUNTIF(B1:B10,"=no")