Function String Searches Class

MinCorrespondingCharacters

" Minimum Corresponding Characters" Return a string where each character represents the minimum ASCII value of the characters in the corresponding position within all of the string arguments. Will return the character from the first string with the minimum value if many characters tie for the minimum.

Signature (Visual Basic / VBA)

Public Function MinCorrespondingCharacters( _
      ByVal vCompare As Variant _
    , ParamArray vStrings() As Variant _
    ) As Variant

Code Example

    MinCorrespondingCharacters(vbTextCompare, "12345ABCDE", "ABCDE67890") = "1234567890"
    MinCorrespondingCharacters(vbTextCompare, "abcDEF", "ABCdef") = "abcDEF"
    MinCorrespondingCharacters(vbTextCompare, "123456", "789") = "123"

Parameters

Parameter Description
vCompare Specifies the type of comparison used to determine if characters in corresponding positions match. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.
vStrings One or more string whose corresponding character positions are to be examined. Function returns Null if any argument is Null or cannot be fixed up to a String. Function only compares corresponding characters up to the length of the shortest string--any characters in positions beyond the length of the shortest string are ignored.