Sub test()
Dim C As Range
'------------------------
For Each C In Range("b2:b11").Cells
If C.Interior.ColorIndex = "43" Then
C.FormatConditions.Delete
Else
Range("b2:b11").FormatConditions.Add(Type:=xlExpression, Formula1:="=NBCAR(SUPPRESPACE(B2))>0").Interior.ColorIndex = 40
End If
Next
'--------------------------------
For Each C In Range("c2:c11").Cells
If C.Interior.ColorIndex = "3" Then
C.FormatConditions.Delete
Else
Range("c2:c11").FormatConditions.Add(Type:=xlExpression, Formula1:="=NBCAR(SUPPRESPACE(C2))>0").Interior.ColorIndex = 40
End If
Next
'----------------------------------
For Each C In Range("H2:H11").Cells
If C.Interior.ColorIndex = "44" Then
C.FormatConditions.Delete
Else
Range("H2:H11").FormatConditions.Add(Type:=xlExpression, Formula1:="=NBCAR(SUPPRESPACE(H2))>0").Interior.ColorIndex = 40
End If
Next
End Sub