Sub Compte_NbOui()
Dim NbOui
Range("A:A).Select 'Colonne où se trouve les oui
NbOui = WorksheetFunction.CountIf(Range(Selection, Selection.End(xlDown)), "=oui") 'compte dans la selection si "=oui"
MsgBox ("Il y a " & NbOui & " lignes égale à 'oui'"), vbInformation 'affiche une msgbox avec le nombre de oui.
End Sub