Hi,
I'm using function Match in VBA (for a fuzzy text search) in the line:
Terms(i) is just a string, the function works fine except that eventually it doesn't find any matches. How could I catch this error using IF?
I've tried this:
but again, it throws an execution Debug error. Same for IsNull. IsNA is not available in VBA. Any ideas?
Thanks, a.
I'm using function Match in VBA (for a fuzzy text search) in the line:
Code:
Application.WorksheetFunction.Match("*" & Trim(Terms(i)) & "*", ActiveSheet.Range("B1:B250"), 0)
Terms(i) is just a string, the function works fine except that eventually it doesn't find any matches. How could I catch this error using IF?
I've tried this:
Code:
If IsError(Application.WorksheetFunction.Match("*" & Trim(Terms(i)) & "*", ActiveSheet.Range("B1:B250"), 0)) Then
'do something
End If
but again, it throws an execution Debug error. Same for IsNull. IsNA is not available in VBA. Any ideas?
Thanks, a.