Replace #VALUE with 0
I have set a formula as below, attempt to replace #VALUE for error with 0,
but it does not work, anyone can give me some hints?
Function evlookup(A, B, C)
D = WorksheetFunction.VLookup(A, B, C, False)
If WorksheetFunction.IsNA(D) = True Then
evlookup = 0
Else
evlookup = D
End If
End Function
|