|You will need an array formula.|
When you enter the formula you must use the
CTRL - SHIFT - ENTER combination, else it won't work.
A B C
in s 35
out m 23
in pd 12
out s 35
in m 23
out pd 12
In Cell C7 put the formula:
=SUM( ( A2:A7 = "in" ) * ( B2:B7 ="s") * C2:C7 )
and you will get the sum of all the S letters in column B,
that also have the word IN in column A
You should be able to figure out the rest.
Again, this is an array formula, use CTRL - SHIFT - ENTER
Also, for new questions, start a new thread.