Code:
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim i As Integer
Dim j As Integer
For i = 0 To DataGridView1.RowCount - 1
For j = 0 To DataGridView1.RowCount - 1
If i > j Then
'If DataGridView1(0, i).Value = DataGridView1(0, j).Value Then
If DataGridView1(0, i).Value = DataGridView1(0, j).Value Then
DataGridView1(3, i).Value = DataGridView1(1, i).Value + DataGridView1(1, j).Value
End If
End If
If i < j Then
'If DataGridView1(0, i).Value = DataGridView1(0, j).Value Then
If DataGridView1(0, i).Value = DataGridView1(0, j).Value Then
DataGridView1(4, i).Value = DataGridView1(1, i).Value + DataGridView1(1, j).Value
End If
End If
If i = j Then
DataGridView1(5, i).Value = DataGridView1(1, i).Value
End If
Next
Next
End Sub
this is the best approach i have so far .. help?