title: excel sum all cells where another cell contains a string
body: <p>Example Table:</p>
  
  <pre>
    | A  |      B       
  --------------------------
  1 | 26 | tom, jerry 
  --------------------------
  2 | 12 | tom
  --------------------------
  3 |  6 | jerry, tom, dick
  </pre>
  
  <p>Suppose I have this table. What I am trying to do is to sum up the total of cells in column A where the cell of the same row in column B contains a certain name, for example "tom". However, before the cell in column A is added to the total, it has to be divided by the number of names in column B.</p>
  
  <p>So for example, if I used the name jerry, I would get a total of:</p>
  
  <p>(26/2) + (6/3) = 15</p>
  
  <p>If I used the name tom, I would get a total of:</p>
  
  <p>(26/2) + 12 + (6/3) = 27</p>
  
  <p>Please help! I am thinking that perhaps it might be too complex and I might need to split it up.</p>