title: Sum rows with same product names but different values Excel vba
body: <p>I'm trying to SUM these values
  <img src="https://i.stack.imgur.com/ALsnP.png" alt="I&#39;m trying to SUM these values">
  And this is what happens after I run the macro. 
  <img src="https://i.stack.imgur.com/qrI4A.png" alt="And this is what happens after I run the macro. "><br>
  I'm having trouble with the following problem, I'm trying to build a macro to combine corresponding values in column A and then SUM the values in column B. </p>
  
  <p>I've tried the following code, which deletes the duplicates in column A but does nothing or very little with column B.</p>
  
  <pre><code>Sub RemoveDupsAndSumUp()
      Application.ScreenUpdating = False
          Columns("A:A").Copy
          Range("C1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
          Range("$C:$C").RemoveDuplicates Columns:=1, Header:=xlNo
          Range("D1").FormulaR1C1 = "=SUMIF(C[-3],RC[-1],C[-2])"
          Range("D1").AutoFill Destination:=Range("D1:D" &amp; Range("C" &amp; Rows.Count).End(xlUp).Row), Type:=xlFillDefault
      Application.ScreenUpdating = True
      End Sub
  </code></pre>