Bonjour,
voici un autre exemple,
j'ai mit la liste de mots à compter sur Feuil4 en cellule A1:Ax et le résultat sur B1:Bx
les mots de cette liste ne sont pas pris en compte dans le résultat.
Sub test()
For i = 1 To Sheets("Feuil4").Cells(Rows.Count, 1).End(xlUp).Row
Sheets("Feuil4").Cells(i, 2) = Compteur(Sheets("Feuil4").Cells(i, 1).Value) - 1
Next i
End Sub
Function Compteur(mot)
For Each sh In Worksheets
With sh.Cells
Set c = .Find(mot, LookIn:=xlValues, LookAt:=xlWhole)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Set c = .FindNext(c)
n = n + 1
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
Next
Compteur = n
End Function