View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lok Tak Cheong Lok Tak Cheong is offline
external usenet poster
 
Posts: 14
Default 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