For f As Integer = 0 To DataGridView1.Rows.Count - 1 Dim view As Integer = Val(DataGridView1.Rows(f).Cells(1).Value) If view > 10000 Then DataGridView1.Rows(f).DefaultCellStyle.BackColor = Color.Red End If Next