Search code examples
excelexcel-formulaexcel-2010excel-2007

Counting status of a variable in Excel


I have a Excel as below:

enter image description here

wanted to count number of passed/failed status against bookings and de-bookings separately as in here Bookings - Passed =1, failed=1; De-Bookings - Passed=1, failed=1 in a separate sheet. The order of bookings and de-bookings cannot be controlled.

I have tried with "CountIf" function but that gives me total number of bookings or de-bookings. Would be helpful if I can do this without VBA.


Solution

  • Put this in F2 and drag/copy it to the right and then select F2 to G2 and drag/copy it down:

    =COUNTIFS($A:$A,$E2,$C:$C,F$1)
    

    enter image description here