Private Sub Worksheet_Change(ByVal Target As Range)
Target.FormatConditions.AddDatabar
With Target.FormatConditions(1)
.MinPoint.Modify newtype:=xlConditionValueNumber, newvalue:=0
.MaxPoint.Modify newtype:=xlConditionValueNumber, newvalue:=100
Select Case Target.Value
Case 0 To 20
.BarColor.Color = vbRed
Case 21 To 60
.BarColor.Color = vbBlue
Case 61 To 100
.BarColor.Color = vbGreen
End Select
End With
End Sub