Re : excel vba comptabiliser dans un useform
Voili voilou,
Coller le code :
Option Explicit
Dim c As Object
Dim i As Integer
Sub occurence()
Application.ScreenUpdating = False
i = 1
Sheets("Feuil2").Select
[E:E] = ""
Sheets("Feuil1").[A:A].AdvancedFilter Action:=xlFilterCopy, CopyToRange:=[E1], Unique:=True
For Each c In Range("e2", [e65536].End(3))
c.Value = c '& " : " &
Sheets("Feuil2").Cells(i + 1, 6) = Application.CountIf([Data], c)
i = i + 1
Next
Range("E2:F65536").Select
Selection.Sort Key1:=Range("E2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Sheets("Feuil2").Cells(1, 1).Select
Application.ScreenUpdating = True
End Sub
Amicalement
Je vais au boulot maintenant