View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default generating a #VALUE

forcing an error in excel will give the results. This worked for me

Function test(target As Range)

test.Value2 = "Error 2015"
End Function

"Smallweed" wrote:

I have a UDF which, if it can't find what it's looking for, I want to return
and show #VALUE in the cell. Any ideas how do I do this? Thanks.