title: If two cells match/duplicates, return and calculate value from second
body: <p>I have a database with various codes and costs allocated to each and looking for a formula to help calculate various costs if their codes match/duplicate.</p>
  
  <p>If codes match/ duplicate in column A then their corresponding cost (column B, in the same row as code) returned in column C</p>
  
  <p>The costs would need to add together, which is where I'm struggling</p>
  
  <p>Can anyone help?</p>
  
  <p><img src="https://i.stack.imgur.com/YkNpe.png" alt="enter image description here"></p>