I found this formula which works in excel, but when I try to put it in vba i get an error message that it is 'unable to get the Match property of the WorksheetFunction class'. Here's my code
Any ideas?
Code:
offsetmsg = Application.WorksheetFunction.Index(offsetwelllookup, Application.WorksheetFunction.Match(Distmsg, leastdist, 0))