1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| 'série de mise en forme conditionnel pour mettre en valeur le probleme
'colorier les doublons
Range("E1:E" & l).FormatConditions.Add Type:=xlExpression, Formula1:="=LEN(SUBSTITUTE($C1;""doublon"";""""))<>LEN($C1)"
With Range("E1:E" & l).FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13421823
.TintAndShade = 0
End With
'colorier les problemes achats
Range("h1:h" & l).FormatConditions.Add Type:=xlExpression, Formula1:="=LEN(SUBSTITUTE($C1;""achat"";""""))<>LEN($C1)"
With Range("h1:h" & l).FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13421823
.TintAndShade = 0
End With
'colorier les problemes ventes
Range("i1:i" & l).FormatConditions.Add Type:=xlExpression, Formula1:="=LEN(SUBSTITUTE($C1;""vente"";""""))<>LEN($C1)"
With Range("i1:i" & l).FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13421823
.TintAndShade = 0
End With
'colorier les problemes de famille
Range("j1:j" & l).FormatConditions.Add Type:=xlExpression, Formula1:="=LEN(SUBSTITUTE($C1;"" famille"";""""))<>LEN($C1)"
With Range("i1:i" & l).FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13421823
.TintAndShade = 0
End With
'colorier les problemes de sous-famille
Range("k1:k" & l).FormatConditions.Add Type:=xlExpression, Formula1:="=LEN(SUBSTITUTE($C1;""sous-famille"";""""))<>LEN($C1)"
With Range("i1:i" & l).FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13421823
.TintAndShade = 0
End With |