Takes 2 parameters, pString1, pString2

Given two strings, this function will return a blank (false) or a value between 1 and 100 depending on how closely the strings match. Values of 100 are possible only when the strings are the same length, and all characters match with the exception of it being case insensitive and also after removing accents from characters.

The comparison strings are first reorganized by sorting the words within, such that the order of multiple words does not affect the score. Further, any extra whitespace is also ignored.

If one string is fully included in the other string, the return value will be at least 50. Therefore, the output of this function will typically only keep values of ==>> 50 and then be sorted from largest value to smallest.

Comparisons are made from left to right, and also right to left, up to the length of the shorter string. Differences in length are deducted from the score. Larger strings are more forgiving than smaller strings for mismatches in terms of values deducted.

This function is intended for simple things like full names. It does not attempt to find substrings within strings other than the above described full match within.


[New] string1 = "abcda"
[New] string2 = "a"

[New] results = Similar$ string1, string2

Html ("results: " & results) 'results is equal to 50