Private Sub Worksheet_Change(ByVal Target As Range)
Dim r&, v&, i&, coeff&, barre As Range, t&, nbChar&
If Not Intersect(Target, [B2:B15]) Is Nothing Then
For t = 1 To Target.Count
r = 0: v = 255
Set barre = Target(t).Offset(, 1)
barre.Font.Size = 6
nbChar& = Round(barre.ColumnWidth - 2)
Debug.Print Target(t).Address
If Target(t) = "" Then barre = ""
barre = String(Round((nbChar / 100) * Val(Target(t).Value * 100)), "g")
If Len(barre) > 20 Then barre = String(20, "g")
If Len(barre) < 1 Then barre = "g"
'If Val(Target.Value * 100) = 0 Or IsEmpty(Target(1)) Then barre = "": Exit Sub
barre.Font.Color = vbRed
For i = 1 To Len(barre.Value)
coeff = Round(255 / nbChar)
v = v - coeff: v = IIf(v < 0, 0, v)
r = r + coeff: r = IIf(r > 255, 255, r)
barre.Characters(Start:=i, Length:=2).Font.Color = RGB(r, v, 0)
Next
Next
End If
End Sub