VLOOKUP

  • Thread starter Thread starter Ulf Nilsson
  • Start date Start date
U

Ulf Nilsson

Hi,

Does VLOOKUP work between different sheets? It doesn't
for me. Help!

/ Ulf
 
Ulf,

you have to be sure to use the right parentheses for the
right situation.

To lookup a value on the same worksheet, use:
=VLOOKUP(F6,$B$4:$C$15,2,FALSE)

For a value on a different worksheet in the same workbook,
place the sheet name in single quotes followed by an
exclamation mark:
=VLOOKUP(F6,'Sheet 1'!$B$4:$C$15,2,FALSE)

For a value in a different worksheet, list the full path
in single quotes with the workbook name in square brackets:
=VLOOKUP(F7,'p:\Example Files\[Book3.xls]Sheet 1'!
$B$4:$C$15,2,FALSE)

Cheers, Pete
 
Pete,
The problem with this is that if the first value cannot
be found, it copies the value from the cell above in the
same worksheet.

/ Ulf
-----Original Message-----
Ulf,

you have to be sure to use the right parentheses for the
right situation.

To lookup a value on the same worksheet, use:
=VLOOKUP(F6,$B$4:$C$15,2,FALSE)

For a value on a different worksheet in the same workbook,
place the sheet name in single quotes followed by an
exclamation mark:
=VLOOKUP(F6,'Sheet 1'!$B$4:$C$15,2,FALSE)

For a value in a different worksheet, list the full path
in single quotes with the workbook name in square brackets:
=VLOOKUP(F7,'p:\Example Files\[Book3.xls]Sheet 1'!
$B$4:$C$15,2,FALSE)

Cheers, Pete
-----Original Message-----
Hi,

Does VLOOKUP work between different sheets? It doesn't
for me. Help!

/ Ulf
.
.
 
Ulf,

AFAIK it should only do that if you omit the ",False)" at
the end of the formula. If you include that, it will
return an error when it can't find an exact match. If you
omit it, it'll return the closest match.

Pete.

-----Original Message-----
Pete,
The problem with this is that if the first value cannot
be found, it copies the value from the cell above in the
same worksheet.

/ Ulf
-----Original Message-----
Ulf,

you have to be sure to use the right parentheses for the
right situation.

To lookup a value on the same worksheet, use:
=VLOOKUP(F6,$B$4:$C$15,2,FALSE)

For a value on a different worksheet in the same workbook,
place the sheet name in single quotes followed by an
exclamation mark:
=VLOOKUP(F6,'Sheet 1'!$B$4:$C$15,2,FALSE)

For a value in a different worksheet, list the full path
in single quotes with the workbook name in square brackets:
=VLOOKUP(F7,'p:\Example Files\[Book3.xls]Sheet 1'!
$B$4:$C$15,2,FALSE)

Cheers, Pete
-----Original Message-----
Hi,

Does VLOOKUP work between different sheets? It doesn't
for me. Help!
 
Pete,

I just want it to result in 0 if not found, not an error.
How is this done?

/ Ulf
-----Original Message-----
Ulf,

AFAIK it should only do that if you omit the ",False)" at
the end of the formula. If you include that, it will
return an error when it can't find an exact match. If you
omit it, it'll return the closest match.

Pete.

-----Original Message-----
Pete,
The problem with this is that if the first value cannot
be found, it copies the value from the cell above in the
same worksheet.

/ Ulf
-----Original Message-----
Ulf,

you have to be sure to use the right parentheses for the
right situation.

To lookup a value on the same worksheet, use:
=VLOOKUP(F6,$B$4:$C$15,2,FALSE)

For a value on a different worksheet in the same workbook,
place the sheet name in single quotes followed by an
exclamation mark:
=VLOOKUP(F6,'Sheet 1'!$B$4:$C$15,2,FALSE)

For a value in a different worksheet, list the full path
in single quotes with the workbook name in square brackets:
=VLOOKUP(F7,'p:\Example Files\[Book3.xls]Sheet 1'!
$B$4:$C$15,2,FALSE)

Cheers, Pete

-----Original Message-----
Hi,

Does VLOOKUP work between different sheets? It doesn't
for me. Help!

.
 
Ulf,

I'm sorry if I misunderstood. I also hope you're still
following this...
To get it to return zero, you have to trap the error
separately, using an If.. statement.

If your original formula is:
=VLOOKUP(F6,$B$4:$C$15,2,FALSE)

Then to return zero if an error occurs, use:
=If(Iserror(VLOOKUP(F6,$B$4:$C$15,2,FALSE)),0,VLOOKUP
(F6,$B$4:$C$15,2,FALSE))

Cheers, Pete
-----Original Message-----
Pete,

I just want it to result in 0 if not found, not an error.
How is this done?

/ Ulf
-----Original Message-----
Ulf,

AFAIK it should only do that if you omit the ",False)" at
the end of the formula. If you include that, it will
return an error when it can't find an exact match. If you
omit it, it'll return the closest match.

Pete.

-----Original Message-----
Pete,
The problem with this is that if the first value cannot
be found, it copies the value from the cell above in the
same worksheet.

/ Ulf
-----Original Message-----
Ulf,

you have to be sure to use the right parentheses for the
right situation.

To lookup a value on the same worksheet, use:
=VLOOKUP(F6,$B$4:$C$15,2,FALSE)

For a value on a different worksheet in the same
workbook,
place the sheet name in single quotes followed by an
exclamation mark:
=VLOOKUP(F6,'Sheet 1'!$B$4:$C$15,2,FALSE)

For a value in a different worksheet, list the full path
in single quotes with the workbook name in square
brackets:
=VLOOKUP(F7,'p:\Example Files\[Book3.xls]Sheet 1'!
$B$4:$C$15,2,FALSE)

Cheers, Pete

-----Original Message-----
Hi,

Does VLOOKUP work between different sheets? It doesn't
for me. Help!
 

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

Back
Top