'أمر الانتقال الى السطر الأول
For Each DataGridView In DataGridView1.Rows
'Me.DataGridView1.CurrentRow.Cells(0).Value عمود الرصيد
'Me.DataGridView1.CurrentRow.Cells(1).Value عمود دائن/مدين
If Me.DataGridView1.CurrentRow.Cells(0).Value = 0 Then
Me.DataGridView1.CurrentRow.Cells(1).Value = ""
ElseIf Me.DataGridView1.CurrentRow.Cells(0).Value < 0 Then
Me.DataGridView1.CurrentRow.Cells(1).Value = "مدين"
Me.DataGridView1.CurrentRow.Cells(0).Value = Me.DataGridView1.CurrentRow.Cells(0).Value.Replace("-", "")
Else
Me.DataGridView1.CurrentRow.Cells(1).Value = "دائن"
End If
'أمر الانتقال الى السطر التالي
Next
'أمر الانتقال الى السطر الأول