Here is my example data set.
Name    Type    B     C     D
Carl    AB      1     0     2
Carl    AB      5     4     1 
Joe     B       0     3     1
Joe     O       2     1     0
Joe     B       4     4     2 
My goal is to calculate the average of column B as a function like: someFunction(Name,Type)
For example, someFunction(Carl,AB) = 3 and someFunction(Joe,B) = 2
Does anyone know how I would go about doing so?
 
     
     
    