Vlookup "#REF!" error when using last column of array

L

lezaheam

I'm using VLookup on a array of five column.
It works fine except if I lookup on the last column of the array.
It returns a "#REF!" error.

Is there a known problem with VLookup and the last column of arrays?

thanks
 
P

Peo Sjoblom

I bet you are mistaken, what's the array and how does your formula look?
If you set it to look in a column not within the array it will throw the ref
error

--


Regards,


Peo Sjoblom
 
T

T. Valko

Post the formula so we can take a look. The #REF! error tells me you're
trying to reference outside the table_array. If your table is 5 columns then
the column_index_num argument can be greater than 5.
 
T

T. Valko

Dang! I missed an entire word!
If your table is 5 columns then the column_index_num argument can be
greater than 5.

Should be:

If your table is 5 columns then the column_index_num argument can *not* be
greater than 5.
 
L

lezaheam

Dang! I missed an entire word!


Should be:

If your table is 5 columns then the column_index_num argument can *not* be
greater than 5.

--
Biff
Microsoft Excel MVP






- Afficher le texte des messages précédents -


Hi and thanks to all

my formula is
ActiveCell.FormulaR1C1 = "=IF(ISNA(VLOOKUP(RC[-7],old,5,FALSE)),
0,VLOOKUP(RC[-7],old,5,FALSE))"

"old" goes from B2 to F5001

however, this monring, I did manage to solve the problem by extending
"old" to G5001
but there's absolutly nothing in column G of the range, not even a
column header.

so i'm still confuse to why I have to extend the range to encompass a
column where there's nothing.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top