+ Reply to Thread
Results 1 to 10 of 10

A double =COUNTIF (for example of all the A's how many have a "yes"?)

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    11

    A double =COUNTIF (for example of all the A's how many have a "yes"?)

    basically what the title said.
    if I have a data sheet that I have about 300 numbers and each of those are split into 5 categories and of those 5 categories each one has either a NO or a YES assigned to it.

    how can I command excel to count the number of Yes entry in a the "A" category.

    note: my data is set as random, this means in column 1 I have my entire sample with each row, randomly, categorizing itself as a A to E and in column 2 I have the YES or NO data.
    this means that excel has to go through each of my rows and find which row has an "A" and of this "A" how many have a YES inside the same row under the second column.

    I hope I was clear.
    Thank you for your time.

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: A double =COUNTIF (for example of all the A's how many have a "yes"?)

    Try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Be sure to adjust the ranges to match your data.
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: A double =COUNTIF (for example of all the A's how many have a "yes"?)

    Or you use pivot table for that.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Registered User
    Join Date
    11-14-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: A double =COUNTIF (for example of all the A's how many have a "yes"?)

    it did not work, it gave me a zero.

    here is what I wrote:
    =SUMPRODUCT((B2:B343="1")*(C2:C343="y"))

    the B colum from 2 to 343 are the five categories, they are not labeled as A but 1 to 5, I only called it that for an easier explantion.

    the column and row numbers are correct, I assure you.

    edit: I am not sure what a pivote table is, Maybe i should have payed attention in Excel class... but then again we did simple stuff I already know :P
    Last edited by Eidius; 11-14-2012 at 01:57 PM.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: A double =COUNTIF (for example of all the A's how many have a "yes"?)

    did you try
    =SUMPRODUCT((B2:B343=1)*(C2:C343="y"))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Registered User
    Join Date
    11-14-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: A double =COUNTIF (for example of all the A's how many have a "yes"?)

    yes and it gives me #NAME?

    previously I used =COUNTIF(B2:B343,"1") and it worked fine, its the second element thats giving me issues...
    Last edited by Eidius; 11-14-2012 at 02:23 PM.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: A double =COUNTIF (for example of all the A's how many have a "yes"?)

    ???that does not give #name?
    Attached Files Attached Files
    Last edited by martindwilson; 11-14-2012 at 02:24 PM.

  8. #8
    Registered User
    Join Date
    11-14-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: A double =COUNTIF (for example of all the A's how many have a "yes"?)

    Quote Originally Posted by martindwilson View Post
    ???that does not give #name?
    i just edited my post, please read the message again for new info and yes I entered this:
    SUMPRODUCT((B2:B343=1)*(C2:C343=y))

    and it does give me a error read as "#NAME?"

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: A double =COUNTIF (for example of all the A's how many have a "yes"?)

    SUMPRODUCT((B2:B343=1)*(C2:C343="y"))

    You have to take the right decription.

    See the diverance with you formula in #8.

  10. #10
    Registered User
    Join Date
    11-14-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: A double =COUNTIF (for example of all the A's how many have a "yes"?)

    oh it works now, I forgot to put the y between " ", it now works normally and indicates there are 32 Ys in my 64 total of 1s.

    thank you, I also asked a question regarding a box plot. here is the link, if you can help me with this it will totally make my day.
    http://www.excelforum.com/excel-gene...ease-help.html

    thank you again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1