Ragdyer wrote:
Could you define "performs better"?
Means more efficient.
I don't doubt you when it comes to anything technical, but I would venture a
guess that the vast majority of the respondents within these groups wouldn't
have come up with your formula if they were given a stipulation of
suggesting a procedure to return an exact match from a datalist.
The OP indicated having a sorted data area/table. Lookup functions are
always faster with such tables. That is:
=VLOOKUP(LookupValue,Table,ColIdx,1)
=INDEX(ReturnRange,MATCH(LookupValue,MatchRange,1) )
=LOOKUP(LookupValue,Table)
The latter does not know better.
If you'll notice, in my original response to the OP, I suggested the Index
and Match combination in addition toVlookup.
Does that combo also "perform less better" then the formula you suggested?
The issue is: What is the match-type? 0 or 1 - if you will, FALSE or
TRUE? Index/Match with match-type set to 1 will perform equally as Lookup.
Is the performance noticable in a 100 row by 50 column datalist? ... 500 X
100?
I think the answer is yes.
I truly believe that the simplicity of the suggestions in a comparison to
the estimated expertise of the OP, gauged by the question itself, dictates
how complex the answer should (could ... would) be.
I can imagine the position you take. On the other hand, correctness,
robustness, and efficiency should be of concern too. Perhaps more so.
[...]
|