Function NombreDeMots(c As String)
Dim temp() As String
Dim compteur As Integer
Dim state As Boolean
state = False
compteur = 1
If InStr(c, ";") <> 0 Or InStr(c, ",") Then
c = Replace(c, " ", "")
c = Replace(c, ",", " ")
c = Replace(c, ";", " ")
c = Trim(c)
End If
temp = Split(c, " ")
For i = 1 To UBound(temp)
state = False
For j = 0 To i - 1
If temp(i) = temp(j) Then
state = True
End If
Next j
If state = False Then
compteur = compteur + 1
End If
Next i
NombreDeMots = compteur
End Function