Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

judoka0209

XLDnaute Occasionnel
bonjour, j'ai une formule qui ne marche pas pour verifier si 2 cellules contiennent une chose

Private Sub Worksheet_Change(ByVal Target As Range)
If Application.WorksheetFunction.CountIf(Range("C6:C11"), "21") + Application.WorksheetFunction.CountIf(Range("C6:C11"), "10") = 2 Then

MsgBox "attention"

If Application.WorksheetFunction.CountIf(Range("C6:C11"), "fp ") + Application.WorksheetFunction.CountIf(Range("C6:C11"), "10") = 2 Then

MsgBox "attention"

End if

End sub
 
Bonjour,

il manque un END IF



Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.WorksheetFunction.CountIf(Range("C6:C11"), "21") + Application.WorksheetFunction.CountIf(Range("C6:C11"), "10") = 2 Then

MsgBox "attention"
End if

If Application.WorksheetFunction.CountIf(Range("C6:C11"), "fp ") + Application.WorksheetFunction.CountIf(Range("C6:C11"), "10") = 2 Then

MsgBox "attention"

End if

End sub
 
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

Réponses
9
Affichages
475
Retour