![]() ![]() The linear nature of the search implies that it probably won't scale very well, but perhaps it will work for your application. False rather than an error code if no match is found. If Excel VBA for the Mac doesn't know about xlErrNA, experimentation suggests that this is just 2042. In other words, if either s is a substring of t or vice-versa. In this code s is considered to be a fuzzy match of t if and only if either s Like "*" & t & "*" or t Like "*" & s & "*". If p Like "*" & s & "*" Or s Like pStar Then Excel has a fuzzy lookup add-in that you can download: /en-us/download/details.aspxid15011 Here is a tutorial on using it: k2e. If no match is found NA is returnedÄim A As Variant, i As Long, s As String, p As String, pStar As String ![]() 'string which is a fuzzy match for pat, returning the corresponding 'does a linear search of first column of array or range arr until it finds a Maybe it will work on a Mac, maybe not (I've had mixed experiences when a colleague who has a Mac has tried to run some of my programs): Function FLOOKUP(pat As String, arr As Variant, ColNum As Long, Optional CaseSensitive = True) As Variant Here is a VBA solution which implements a rather weak fuzzy lookup.
0 Comments
Leave a Reply. |