View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default Need Help with VLOOKUP

"Steve Ross" wrote:
=INDEX($D$698:$D$1318,MATCH(B19&C19,$B$698:$B$1318 &$C$698:$C$1318,0))
and enter the array formula with CTRL+Shift+Enter

[....]
What is the reason one must enter CNTL+Shift+Enter?
What does that do?


It causes the formula to be "array-entered".

The expression $B$698:$B$1318&$C$698:$C$1318 is intended to build an array
for the 2nd parameter.

Since the 2nd parameter is supposed to be an array or range, you would think
Excel would know what to do with the expression. And in some contexts, it
does. But sometimes, Excel needs help in determining our intent.

So sometimes (difficult to say when), we must "array-enter" the formula by
pressing ctrl+shift+Enter. Excel will identify the array-entered formula by
displaying it with curly braces around it, e.g. {=formula}. We cannot type
the curly braces ourselves in this context. So we must remembrer to press
ctrl+shift+Enter every time we edit and re-enter the formula.

Caveat: Often, if we forget to press ctrl+shift+Enter when we should, Excel
will return a #VALUE error to let us know something is wrong. But in some
contexts, Excel might interpret the array parameter in a non-array-entered
formula as single-valued. So there is no Excel error. This can be
misleading.

For that reason, I avoid array-entered formulas -- although it might be
needed in this case. A possible alternative is to put the formula
=B698&C698 into column E (e.g.) and use the follow normally-entered formula:

=INDEX($D$698:$D$1318,MATCH(B19&C19,$E$698:$E$1318 ,0))

It is also more efficient in both time and space.