title: How can i sum some numbers with same value in A column?
body: <p>i have in A column some names and in b column some numbers like:</p>
  
  <pre><code>jimmy 4
  jimmy 4
  carl  8
  john  8
  </code></pre>
  
  <p>I need to sum jimmy's numbers. I mean, if there are some same values in A colum the sum the B numbers of that name. So jimmy = 8.
  How can i do it? I'm very new in vba so the easy things for me are not so easy :)</p>
  
  <p>EDIT, the macro:</p>
  
  <pre><code>Sub Sample()
      Dim path As String
      Dim openWb As Workbook
      Dim openWs As Worksheet
      Dim DataInizio As String
      Dim DataFine As String
  
      path = "C:\Me\Desktop\example.xls"
  
      Set thiswb = ThisWorkbook
  
      Set openWb = Workbooks.Open(path)
      Set openWs = openWb.Sheets("details")
  
      Set Logore = thiswb.Sheets("Log")
  
      With openWs
           start = CDate(InputBox("start (gg/mm/aaaa)"))
           end = CDate(InputBox("end (gg/mm/aaaa)"))
           Sheets("details").Select
  
           LR = Cells(Rows.Count, "A").End(xlUp).Row
           dRow = 2
  
           For r = 2 To LR
           If Cells(r, 1) &gt;= start And Cells(r, 1) &lt;= end Then
           ' Do un nome alle colonne nel file di log indicandone la posizione
             ore = Range("K" &amp; r)
             nome = Range("J" &amp; r)
             totore = totore + ore
                If ore &lt;&gt; 8 Then
                  Range("A" &amp; r &amp; ",J" &amp; r &amp; ",D" &amp; r &amp; ",K" &amp; r).Copy Logore.Cells(dRow, 1)
                  rigatot = dRow
                  dRow = dRow + 1
                End If
                If nome &lt;&gt; Range("J" &amp; r + 1) Then
                    If totore &lt;&gt; 40 Then
                      Logore.Cells(dRow, 5) = totore
                    End If
                    totore = 0
                End If
            End If
           Next
           thiswb.Sheets("Log").Activate
      End With
      openWb.Close (False)
  End Sub
  </code></pre>