application.worksheetfunction.vlookup
Julie, when I try it certainly does error when the item is not found. I
would suggest that it does find the item in the 1st column but that the cell
in the second column is empty and so this empty value is returned. This is
not an error since the item is found.
Fred
"JulieD" wrote in message
...
Hi
for the first time i'm using worksheet functions in vba and was surprised
to
find that
k =
application.worksheetfunction.vlookup(pipes(j),She ets("Database").Range("Pip
e_Number"),2,0)
shows k as empty rather than "erroring" or #NA .. i tried to get a handle
on
this in vba help but it didn't seem to explain this behaviour - can anyone
explain to me why and, in some ways, more importantly how i can get "k" to
"error" if the item isn't found?
Thanks
JulieD
|