Excel VBA: Can’t get a match, error “Unable to get the Match property of the WorksheetFunction class”

Use the Application.Match function which allows for better ability to trap errors. When using the WorksheetFunction.Match, when a match is not found, it returns an error, which is what you’re experiencing. You could also potentially use the CountIf function: Neither of these approaches requires you to use the m1 variable, you can assign this variable within the True part of the If/Then statement, if you need … Read more