Bonjour;
J'ai ici un code avec deux fonctions CountIf. Mais il n'y à que la première qui marche. On dirait qu'elle domine la deuxième. Je ne vois pas de solution. Pourriez-vous m'aider.
Code :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If WorksheetFunction.CountIf(Range("A1"), "*a*") Then
Range("B1") = 1
Else
Range("B1") = ""
End If
Exit Sub
If WorksheetFunction.CountIf(Range("A1"), "*b*") Then
Range("B1") = 2
Else
Range("B1") = ""
End If
Exit Sub
End Sub
Merci