Try
Dim i5 As Integer
For i5 = 0 To DataGridView2.Rows.Count - 1
If DataGridView2.Rows(i5).Cells(8).Value.ToString = "غائب" And DataGridView2.Rows(i5).Cells(9).Value.ToString = "لايوجد" Then
DataGridView2.Rows(i5).Selected = True
End If
Next
Catch ex As Exception
End Try
"بشرط أنها تحتوي"
يعني = وليست <>
Dim i5 As Integer
For i5 = 0 To DataGridView2.Rows.Count - 1
If DataGridView2.Rows(i5).Cells(8).Value.ToString = "غائب" And DataGridView2.Rows(i5).Cells(9).Value.ToString = "لايوجد" Then
DataGridView2.Rows(i5).Selected = True
End If
Next
Catch ex As Exception
End Try
"بشرط أنها تحتوي"
يعني = وليست <>
