VLOOKUP

P

Pete McCosh

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
 
G

Guest

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
.
.
 
P

Pete McCosh

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!
 
U

Ulf Nilsson

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!

.
 
P

Pete McCosh

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!
 
Top