If Range("b" & Target.Row).Value = 1 Then
If Range("d" & Target.Row).Value < Range("d65530") - 0.07 Or Range("d" &
Target.Row).Value > Range("d65530") + 0.07 Then
Range("d" & Target.Row).Font.ColorIndex = 3
Else
Range("d" & Target.Row).Font.ColorIndex = 1
End If
End If
If Range("b" & Target.Row).Value = 2 Then
If Range("d" & Target.Row).Value < Range("d65529") - 0.07 Or Range("d" &
Target.Row).Value > Range("d65529") + 0.07 Then
Range("d" & Target.Row).Font.ColorIndex = 3
Else
Range("d" & Target.Row).Font.ColorIndex = 1
End If
End If
If Range("b" & Target.Row).Value = 3 Then
If Range("d" & Target.Row).Value < Range("d65532") - 0.05 Or Range("d" &
Target.Row).Value > Range("d65532") + 0.05 Then
Range("d" & Target.Row).Font.ColorIndex = 3
Else
Range("d" & Target.Row).Font.ColorIndex = 1
End If
End If
If Range("b" & Target.Row).Value = 4 Then
If Range("d" & Target.Row).Value < Range("d65531") - 0.05 Or Range("d" &
Target.Row).Value > Range("d65531") + 0.05 Then
Range("d" & Target.Row).Font.ColorIndex = 3
Else
Range("d" & Target.Row).Font.ColorIndex = 1
End If
End If
i use this code and its work good
but i need to use conditional formatting Or Select Case