i am trying a code for this
but it give me some error
can u cheak it plz ..
Private Sub calculateIngradient_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a, b As String
For i = 0 To DataGridView1.RowCount - 1
a = DataGridView1.Rows(i).Cells(0).Value
For j = 0 To DataGridView1.RowCount - 1
b = DataGridView1.Rows(j).Cells(0).Value
If a = b Then
DataGridView1.Rows(i).Cells(1).Value = DataGridView1.Rows(i).Cells(1).Value + DataGridView1.Rows(j).Cells(1).Value
DataGridView1.Rows(i).Cells(2).Value = DataGridView1.Rows(i).Cells(2).Value & " / " & DataGridView1.Rows(j).Cells(2).Value
DataGridView1.Rows.Remove(DataGridView1.Rows(j))
End If
Next
Next
End Sub