Glory
Well-known Member
- Joined
- Mar 16, 2011
- Messages
- 640
a = Application.WorksheetFunction.Match("a", Range("J1:J10"))
MsgBox a
I was just going to do if isempty(a) later on, but it turns out it doesn't just leave the variable empty if there's no match... it errors out.
Is there a simple way to get around this problem without an error handler?
Error: "Unable to get the match property of the worksheet function class"
MsgBox a
I was just going to do if isempty(a) later on, but it turns out it doesn't just leave the variable empty if there's no match... it errors out.
Is there a simple way to get around this problem without an error handler?
Error: "Unable to get the match property of the worksheet function class"