i have a datagrid and want to format the cell background colours which is working fine.
as you can see if the value of the cell is > 95 the cell goes green
if the cell value is < 90 the cell goes red.
i need help with anything between 95 and 90 i would like this to turn yellow
Dim cell As DataGridViewCell
Dim CellVar As Double
For Each row As DataGridViewRow In Me.OEEGrid.Rows
cell = row.Cells("Yield")
CellVar = CDbl(row.Cells("Yield").Value)
If CellVar <= 90 Then
cell.Style.BackColor = Color.Red
ElseIf CellVar >= 95 Then
cell.Style.BackColor = Color.Green
End If
Next