Searching Names

  • Thread starter Thread starter exsam21
  • Start date Start date
E

exsam21

Here is the problem that I am having. I have 50 employees and I have
three columns with 'employee #', 'Last Name', and 'First Name'.

A B C
Emp# Last First
1 Smith John
2 Doe Jane
.. . .
.. . .
.. . .

I want to set up a formula so that when I input the number "1" on cell
D1, "Smith" will populate E1, and "John" will populate F1. And if I
were to input "2" in cell D1, "Doe" will populate E1, and "Jane" will
populate F1. Thank you very much.
 
exsam21 said:
Here is the problem that I am having. I have 50 employees and I have
three columns with 'employee #', 'Last Name', and 'First Name'.

A B C
Emp# Last First
1 Smith John
2 Doe Jane
. . .
. . .
. . .

I want to set up a formula so that when I input the number "1" on cell
D1, "Smith" will populate E1, and "John" will populate F1. And if I
were to input "2" in cell D1, "Doe" will populate E1, and "Jane" will
populate F1. Thank you very much.

ASSUME that your table range is A1:C50, enter this formula in:

Cell E1: =vlookup(D1,A1:C50,2,0)

Cell F1: =vlookup(D1,A1:C50,3,0)

Regards.
 
In E1 enter =VLOOKUP(D1,A2:C10,2,0)
In F1 enter =VLOOKUP(D1,A2:C10,3,0)

HTH
Regards,
Howard
 
#N/A is what I am getting. I am not sure why.

Make sure the lookup number, 1, 2, 3 etc in column A is really a number.
Check for leading or trailing spaces. If the numbers are to the left in the
cell in column A, they are text and the number in D1 is a real number which
will return #N/A.

HTH
Regards,
Howard
 

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