title: Check if a value is in an array and then count the required values in another column
body: <p>I have a list of repeating values in column A which I need to summarise and score. I want to check if the value in column A is "A" and then count how many issues (Column G) there are. <code>X</code> gives 1 point, <code>Y</code> gives 2 points and <code>Z</code> gives 0 points:  </p>
  
  <p><a href="https://i.stack.imgur.com/6OsGD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6OsGD.png" alt="SO3396 785 question example"></a></p>
  
  <p>Goal is for each unique Desk to have a score of the issues. The resulting values for this exemplary list are written in column J but it needs to be a formula.</p>
  
  <p>Any ideas?</p>