check two conditions in two different columns in excel and count the matches

Posted by user1727103 on Super User See other posts from Super User or by user1727103
Published on 2012-10-07T18:23:23Z Indexed on 2012/10/08 3:39 UTC
Read the original article Hit count: 214

Filed under:
|

I've trying to create a Error Log to help me analyse my mistakes. So for simplicity, lets assume I have two columns "Type of Question" - with values SC,RC,CR and another column that indicates whether I got this question "right/wrong".Let's assume this is my table:

Question No. | Right/Wrong | Question Type

  1. | Right | SC

  2. | Right | RC

  3. | Wrong | SC

  4. | Wrong | CR

  5. | Right | RC

(Pardon my formatting skills).

And I want an output table like this

Type of Question | Right | Wrong | Total

SC | 1 | 1 | 2

RC | 2 | 0 | 2

CR | 0 | 1 | 1

So basically what I want to do is check Column3 for SC using =COUNTIF(C1:C5,"SC"), and return the total number of SC questions, and then outta the SC , I need to find out which are Right.If I know the right and the total I can get the wrong.

I have never written a macro so a formula based answer would suffice.

© Super User or respective owner

Related posts about microsoft-excel

Related posts about countif