Sub comptage4()
Range("f2" ).Select
Range("t2:u15" ).ClearContents
Do While UCase(ActiveCell) <> ""
cpt = 0
Do While UCase(Range("t2" ).Offset(cpt, 0)) <> "" And UCase(Range("t2" ).Offset(cpt, 0)) <> UCase(ActiveCell)
cpt = cpt + 1
Loop
If Range("t2" ).Offset(cpt, 0) = "" Then
Range("t2" ).Offset(cpt, 0) = ActiveCell.Value
End If
Selection.Offset(1, 0).Select
Loop
Range("t2" ).Select
Do While UCase(ActiveCell) <> ""
cpt = 0
Do While UCase(Range("f2" ).Offset(cpt, 0)) <> ""
If UCase(Range("f2" ).Offset(cpt, 0)) = UCase(ActiveCell) Then
Selection.Offset(0, 1) = 1 + Selection.Offset(0, 1)
End If
cpt = cpt + 1
Loop
Selection.Offset(1, 0).Select
Loop
End Sub |