View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
external usenet poster
 
Posts: 2,203
Default Substitute IF statement.

Well, I'm glad my part of it ended up working. Remember that all LOOKUP
variants; LOOKUP, VLOOKUP and HLOOKUP always stop looking at the first match
they make, so they can't see multiple possible matches in a list. Also,
unless you specify the 4th parameter in VLOOKUP() and HLOOKUP() as ,FALSE)
then the lists have to be in sequence.

"David" wrote:

JLatham:
Thanks for helping me out.
I realied I made a mistake in mod your UDF.
I also found the issue I have was due to excel itself.
I found in some instances, excel did logical comparison wrong.
In one instance, the output from lookup function was 20 and the other one
was 450.
In my IF statement, I wrote if cell with 20 was greater than cell with 450.
I got the wrong answer. I plugged in number instead and it worked just fine.
I think MS needs to redefine the lookup function.
Now, I use a several lookup to get a several results and then I place them
as value and use IF to redefine the result. It is a long way but somehow it
works almost 90% of the times.

Thanks for your help.