Korrektur
Hi,
habe noch einen Punkt der Konventionen vergessen.
Public Function soundex(wort As String)
Dim i As Integer
Dim merker As String
i = 2
soundex = UCase(Mid(wort, 1, 1))
While Len(wort) \>= i And Len(soundex) 0 Then soundex = soundex & "1"
If InStr(1, "cgjkqsßxz", LCase(Mid(wort, i, 1))) \> 0 Then soundex = soundex & "2"
If InStr(1, "dt", LCase(Mid(wort, i, 1))) \> 0 Then soundex = soundex & "3"
If InStr(1, "l", LCase(Mid(wort, i, 1))) \> 0 Then soundex = soundex & "4"
If InStr(1, "mn", LCase(Mid(wort, i, 1))) \> 0 Then soundex = soundex & "5"
If InStr(1, "", LCase(Mid(wort, i, 1))) \> 0 Then soundex = soundex & "6"
If Len(soundex) \> 1 And InStr(1, "aeiouy", merker) = 0 And i \> 2 Then
If Mid(soundex, Len(soundex), 1) = Mid(soundex, Len(soundex) - 1, 1) Then
soundex = Mid(soundex, 1, Len(soundex) - 1)
End If
End If
merker = Mid(wort, i, 1)
i = i + 1
Wend
soundex = soundex & String(4 - Len(soundex), "0")
End Function
Gruß.Timo