Run time error '1004' Unable to get the Match propertyof the WorksheetFunction class

前端 未结 6 1309
悲&欢浪女
悲&欢浪女 2021-01-17 01:29

In my macro, I have the following code :

i = Application.WorksheetFunction.Match(str_accrual, Range(Selection, Selection.End(xlToRight)), 0)
6条回答
  •  醉梦人生
    2021-01-17 02:05

    I tried several times. It seems that if there is no match, the expression will prompt this error

    if you want to catch the error, use Application.Match instead

    Then you can wrap it with isError

提交回复
热议问题