this code is all perfect and correct, I am trying to do one change and in the end " Case Else: sRGB = "0,176,80" 'Green" i want to add these color's start:- 0,109,42 Mid:- 0,158,65 End:- 0,189,79 and this condition is only for Green. rest color and conditions will not change.
Is there a way to modify this.
Is there a way to modify this.
VBA Code:
Sub fillcolorRetOLT()
Dim i As Long
Dim a As Long
Dim sRGB As String
Dim vRGB As Variant
'On Error Resume Next
For i = 1 To 13
Select Case Sheet4.Cells(i + 3, 30).Value
' Case Is > 40: sRGB = "255,0,0"
Case Is < 90: sRGB = "255,0,0" 'Red
Case Is <= 98.5: sRGB = "255,255,0" 'yellow
Case Is <= 99.9: sRGB = "146,208,80" 'Light Green
Case Else: sRGB = "0,176,80" 'Green
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Case Else: sRGB = "0,176,80" 'Green
'I want to add the 3 color conditions here
'start:- 0,109,42 Mid:- 0,158,65 End:- 0,189,79
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
End Select
vRGB = Split(sRGB, ",")
Sheet4.Shapes.Range(Array("Rectangle " & i)).Fill.ForeColor.RGB = RGB(vRGB(0), vRGB(1), vRGB(2)) ', vRGB(3))
Next i
End Sub