Это сработало для меня:
Function TypeDesc(Desc As String, Qty As Double) As Double
Dim m
With ThisWorkbook.Sheets("data").ListObjects("Types15")
'vlookup works well here...
m = Application.VLookup(Desc, .DataBodyRange, 4, False) 'you have 7 here?
End With
If IsError(m) Then m = "No" 'error means no match: set to "No"
TypeDesc = IIf(m = "Yes", Qty, 0)
End Function