Trouble with vLookup

  • Thread starter lcks via OfficeKB.com
  • Start date
L

lcks via OfficeKB.com

Not sure if I am using the right formula however this is what I want to
achieve.

On "Main" spreadsheet I have a long list of Names in column (B:B) - not in
assending order and a separate workbook i will call "Data" with similiar
names however this list is shorter and does not all included the names in
the MAIN spreadsheet - this sheet I have in alphabetical order.

vlookup(B:B,C3:F30,4,false) - this didn't work - vlookup(B:B,C3:F30,4) -this
worked when B:B was smaller then the array and with both in assending.

I want to look up the name in column B "main spreadsheet" I can reference to
a single cell if need to, I want to go and search in my "Data" workbook array
B3:E30 the name is in the "B" once find the match, I want to return the value
in the 4 column in the array on my Main spreadsheet and if the name is not
found than enter "0" in my "Main" spreadsheet.

Thank you
 
R

Roger Govier

Hi

Try
In workbook Data
=IF(ISERROR(VLOOKUP(B1,[Main.xls]Sheet1!$B$3:$E$30,4,0)),0,
VLOOKUP(B1,[Main.xls]Sheet1!$B$3:$E$30,4,0))
copy down as far as required

This assumes you do have a separate workbook called Main.xls and that
your data is on sheet - change accordingly.
If they are not separate workbooks, but separate sheets in the same
workbook, then change
[Main.xls]Sheet1!$B$3:$E$30 to Main!$B$3:$E$30
 

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