'returns the top three matches in a HORIZONTAL arrayįArr((2 * p) - 1) = tArr(p, 1) 'numeric fuzzy score If tcount > 3 Then retValCount = 3 Else retValCount = tcount If tcount > 1 Then tArr = BubbleSrt(tArr, True) TArr(i, 1) = Levenshtein(rng1.Value, sRng.Value) 'match number is the number if character changes required to one string toįunction CustomFuzzy(rng1 As Range, rng2 As Range) As Variant '(rng1= single value, rng2=comparisons range)įor Each sRng In rng2 ' = 1 To tcount 'Each tRng In rng2 'top three matches with their numeric match values. 'This version allows the use of ranges instead of strings, and returns the In reality, you don't need the bubblesort if you are just comparing two values, but I'm leaving it in there in case you decide to edit the code for other purposes. Here is a UDF paste everything below into a code module, then per the references above, in C4 you would use A4 and B4) you want the numeric representation of how "different" those two values are (0=no difference) If I understand correctly, you have two columns of data, and for any pair of values (e.g.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |