VLOOKUP

H

Help

I am using VLOOKUP to pull data from another spreadsheet.
I have a list of staff names on each spreadsheet - and use VLOOKUP in
worksheet 1 to find the names in worksheet 2.
But I have additional names in worksheet 1 that do not appear in worksheet 2.
If those names don't appear in worksheet 2 - I want VLOOKUP to enter a 0 in
my column of data in worksheet 1.
How do I do that?
 
H

Help

I'm still having trouble with this. Here's what I have entered:

=IF(ISNA(VLOOKUP(B23,'Sheet 2'!21:127,6)),0,VLOOKUP(B23,'Sheet 2'!21:127,6))

B23 - is the staff member's name I am searching for - and I want to insert
whatever data is in column 6 on Sheet 2. But if the staff member's name is
not on Sheet 2 - it still puts data in there - and I want it to read 0 - if
the staff member's name is not on Sheet 2.
 
J

JMB

by omitting the fourth argument, you are performing an approximate match
lookup. you probably want an exact match lookup:
VLOOKUP(B23,'Sheet 2'!21:127,6, FALSE)
 
K

Kassie

Thanks JMB! That was a serious slip on my part!

Help. I notice that you did not include columns? Something like
=IF(ISNA(VLOOKUP(B23,'Sheet 2'!A21:F127,6,FALSE)),0,VLOOKUP(B23,'Sheet
2'!A21:F127,6,FALSE)) is closer to the truth. Vlookup needs to know where to
look!
 
J

JMB

No - you didn't slip. Wasn't really enough detail regarding the formula the
OP was using until now.

However, vlookup seemed to work okay for me using only row references (I've
never used entire row references with vlookup so it appeared a little odd to
me as well).
 

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

Top