Function String Words Class

SoundexExtended

Convert a string to its four-character Extended Soundex code, which will be the same for many words which are spelled similarly. Useful for finding the names within a database table that are spelled similarly. Similar to the Soundex function except that this one converts even the first character of string vValue into the appropriate numeric character class.

Signature (Visual Basic / VBA)

Public Function SoundexExtended( _
    ByVal vValue As Variant _
    ) As Variant

Code Example

    SoundexExtended("Smith") = "2530"
    SoundexExtended("Smythe") = "2530"
    SoundexExtended("Jones") = "2520"

Parameters

Parameter Description
vValue String containing the English word or phrase which is to be converted to a four-character Soundex code. Function returns Null if vValue is Null or cannot be fixed up to a String.

Notes & Version History

Note The MetaPhone function is better at distinguishing words which are spelled differently but may sound alike.
Algorithm Each character is grouped into one of six classes each represented by a numeric digit from 1 to 6. Sequences of more than one character from the same character class are represented by only one class identifier. Vowels are ignored, except that they separate repeated runs of characters which would otherwise be condensed to a single number for the character class. The result string is to be no longer than four characters long, but if it is less than four characters long, it is right-filled with zero characters.