Bonjour Zagalo,
Essaye ça en macro :
Sub TestCode21()
For i = 2 To Cells(Rows.Count, 2).End(xlup).Row
If Len(Cells(i, 2)) <> 21 Then
With Cells(i, 2).Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else
With Cells(i, 2).Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
Next i
End Sub
Et soit tu fais un bouton, soit tu associes la macro à un évènement du style SheetSelectionChange
Et sinon, tu dois pouvoir bidouiller un truc en MeF (mise en forme) conditionnelle, il faut juste trouver la fonction Excel qui compte les caractères!
Bon courage