Dim cell As DataGridViewCell
For i = 0 To DataGridView1.Rows.Count - 1
cell = DataGridView1.Rows(i).Cells(4)
If cell.Value = "已住" Then
DataGridView1.Rows(i).DefaultCellStyle.BackColor = Color.Yellow
End If
Next