Hi All,
I'm trying to solve a problem with run-time error 1004: unable to get the Match property of the WorksheetFunction class for part of a macro below that was created by a coworker.
After some researching, it's advised that Application.Match should be used instead of Application.WorksheetFunction.Match. It's stated that Application.Match will return an error value if there's no match found & IsError can determine how to handle the error. I tried integrating Application.Match on my own but still got the same error.
I'm not sure the correct way to integrate Application.Match & IsError into existing code with the desired result, if no match then leave blank. Could you please advise a novice?
'Index to get Requestor Name
Range("B" & x).Value = Application.WorksheetFunction.Index(Sheets("Rostr").Range("A:T"), _
Application.WorsheetFunction.Match(ActiveSheet.Range("K" & x).Value, Sheets("Rostr").Range("B:B"), 0), 5)
If Range("B" & x).Value = "CMS Interface" Then
Range("B" & x).Value = "Corporate Citizenship"
End If
Thanks so much for your time & effort!
I'm trying to solve a problem with run-time error 1004: unable to get the Match property of the WorksheetFunction class for part of a macro below that was created by a coworker.
After some researching, it's advised that Application.Match should be used instead of Application.WorksheetFunction.Match. It's stated that Application.Match will return an error value if there's no match found & IsError can determine how to handle the error. I tried integrating Application.Match on my own but still got the same error.
I'm not sure the correct way to integrate Application.Match & IsError into existing code with the desired result, if no match then leave blank. Could you please advise a novice?
'Index to get Requestor Name
Range("B" & x).Value = Application.WorksheetFunction.Index(Sheets("Rostr").Range("A:T"), _
Application.WorsheetFunction.Match(ActiveSheet.Range("K" & x).Value, Sheets("Rostr").Range("B:B"), 0), 5)
If Range("B" & x).Value = "CMS Interface" Then
Range("B" & x).Value = "Corporate Citizenship"
End If
Thanks so much for your time & effort!