ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VLOOKUP Question (https://www.excelbanter.com/excel-programming/408855-vlookup-question.html)

Gary M.[_2_]

VLOOKUP Question
 
Hi,
I have a spreadsheet with random employee #'s in column A on sheet 1. On
sheet 2 I have employee #'s in column A, and employee names in column B. On
sheet 1 I want to add employee names in column B. I used the following in
code in B1, B2, & B3 respectively -
=VLOOKUP(A1,Sheet2!A1:B187,2)
=VLOOKUP(A2,Sheet2!A1:B187,2)
=VLOOKUP(A3,Sheet2!A1:B187,2)

For some reason only line 1 displays the employee name. I get #N/A on lines
2 & 3 yet on sheet 2 the numbers and names are present. Can someone tell me
what I'm missing?


Jim Thomlinson

VLOOKUP Question
 
Try this...

=VLOOKUP(A1,Sheet2!$A$1:$B$187,2, False)

--
HTH...

Jim Thomlinson


"Gary M." wrote:

Hi,
I have a spreadsheet with random employee #'s in column A on sheet 1. On
sheet 2 I have employee #'s in column A, and employee names in column B. On
sheet 1 I want to add employee names in column B. I used the following in
code in B1, B2, & B3 respectively -
=VLOOKUP(A1,Sheet2!A1:B187,2)
=VLOOKUP(A2,Sheet2!A1:B187,2)
=VLOOKUP(A3,Sheet2!A1:B187,2)

For some reason only line 1 displays the employee name. I get #N/A on lines
2 & 3 yet on sheet 2 the numbers and names are present. Can someone tell me
what I'm missing?


Niek Otten

VLOOKUP Question
 
Hi Gary,

Use

=VLOOKUP(A1,Sheet2!A1:B187,2,FALSE) etc

Look in HELP for the meaning of the 4th argument

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Gary M." wrote in message ...
| Hi,
| I have a spreadsheet with random employee #'s in column A on sheet 1. On
| sheet 2 I have employee #'s in column A, and employee names in column B. On
| sheet 1 I want to add employee names in column B. I used the following in
| code in B1, B2, & B3 respectively -
| =VLOOKUP(A1,Sheet2!A1:B187,2)
| =VLOOKUP(A2,Sheet2!A1:B187,2)
| =VLOOKUP(A3,Sheet2!A1:B187,2)
|
| For some reason only line 1 displays the employee name. I get #N/A on lines
| 2 & 3 yet on sheet 2 the numbers and names are present. Can someone tell me
| what I'm missing?
|



Niek Otten

VLOOKUP Question
 
And if you use the $ sings like Jim suggested, tou can drag the formula down instead of having to retype it

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Niek Otten" wrote in message ...
| Hi Gary,
|
| Use
|
| =VLOOKUP(A1,Sheet2!A1:B187,2,FALSE) etc
|
| Look in HELP for the meaning of the 4th argument
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "Gary M." wrote in message ...
|| Hi,
|| I have a spreadsheet with random employee #'s in column A on sheet 1. On
|| sheet 2 I have employee #'s in column A, and employee names in column B. On
|| sheet 1 I want to add employee names in column B. I used the following in
|| code in B1, B2, & B3 respectively -
|| =VLOOKUP(A1,Sheet2!A1:B187,2)
|| =VLOOKUP(A2,Sheet2!A1:B187,2)
|| =VLOOKUP(A3,Sheet2!A1:B187,2)
||
|| For some reason only line 1 displays the employee name. I get #N/A on lines
|| 2 & 3 yet on sheet 2 the numbers and names are present. Can someone tell me
|| what I'm missing?
||
|
|




All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com