Crookshanks
Technical User
Goodmorning,
I am trying to use a worksheetfunction in VBA to win some time. I want to use the MATCH function to retrieve the row in which a certain item is stored. In this case I don't have to loop through an array.
Function finditem(dataItem)
Dim row DD as variant
rowDD = Application.WorksheetFunction.Match(dataItem, Worksheets("DD").Range("b1:b150"), 0)
I want rowDD to return the rownumber in which dataItem is stored in column B. But the function keeps returning an #value statement in the destination cell of the function. Has anybody an idea what I've done wrong?
Thanks in advance, kind regards.
I am trying to use a worksheetfunction in VBA to win some time. I want to use the MATCH function to retrieve the row in which a certain item is stored. In this case I don't have to loop through an array.
Function finditem(dataItem)
Dim row DD as variant
rowDD = Application.WorksheetFunction.Match(dataItem, Worksheets("DD").Range("b1:b150"), 0)
I want rowDD to return the rownumber in which dataItem is stored in column B. But the function keeps returning an #value statement in the destination cell of the function. Has anybody an idea what I've done wrong?
Thanks in advance, kind regards.