View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default COUNTIF Function with variables

Hi

With initials and fails in columns A:C and a table of unique initials in
column H this formula will return the number of passed tests:

=SUMPRODUCT(($A$2:$A$100=H2)*1,($B$2:$B$100="")*1, ($C$2:$C$100="")*1)

And this will return the number of faild tests. A test will count as one if
either or both tests in same row is failed:

=SUMPRODUCT(($A$2:$A$100=H2)*1,($B$2:$B$100="X")*1 )+SUMPRODUCT(($A$2:$A$100=H2)*1,($C$2:$C$100="X")* 1)-SUMPRODUCT(($A$2:$A$100=H2)*1,($B$2:$B$100="X")*1, ($C$2:$C$100="X")*1)

The formula is to be entered as one line.

Regards,
Per

"TJ" skrev i meddelelsen
...
I have a spreadsheet that records the initials of a stage check airman in
one
column, the next column can be marked with an X if the student fails the
oral
portion, the next column marked with an X if they fail the flight portion.
I
want to count the number of times the initials are found with no X's in
either column (which means the student passed the check) and also count
the
number of times the initials are found with either column having an X in
it.

Any suggestions?