ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Look up function--HELP! (https://www.excelbanter.com/excel-worksheet-functions/18353-look-up-function-help.html)

barb

Look up function--HELP!
 
I need help! I am trying to find the function (I think it is look-up
function) that will return a name in a cell when I type a number in another
cell. For example:
I type in the number 1 in cell A2 I want it to refer to a list of numbers
and in cell B2 return the corresponding name for that number. Can anyone
help?
I have a list of member numbers and names; I want to be able to type in the
member number and have the name automatically pop up in the adjacent cell.
Thanks!

Chip Pearson

Most likely, you want to use the VLOOKUP function. See Help for
more details.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"barb" wrote in message
...
I need help! I am trying to find the function (I think it is
look-up
function) that will return a name in a cell when I type a
number in another
cell. For example:
I type in the number 1 in cell A2 I want it to refer to a list
of numbers
and in cell B2 return the corresponding name for that number.
Can anyone
help?
I have a list of member numbers and names; I want to be able to
type in the
member number and have the name automatically pop up in the
adjacent cell.
Thanks!




Ken

Barb, two ways to approach this:

1. LOOKUP function:
Assume column A is where you will enter the number and column B is where you
want the result.

In B1 enter:

=IF(ISERROR(LOOKUP(A1,{1,2,3,4,5;"A","B","C","D"," E"})),"",LOOKUP(A1,{1,2,3,4,5;"A","B","C","D","E"} ))

Copy the formula down as many rows in column B as necessary. As you can see,
this can get unwieldly if you have a long list of names.

2. VLOOKUP function:

In an empty column (D for example) enter the numbers. In the next empty
column (E) enter the names next to the numbers.

Assume column A is where you will enter the number and column B is where you
want the result.

In B1 enter:

=IF(ISERROR(VLOOKUP(A3,$D$1:$E$5,2,FALSE)),"",VLOO KUP(A3,$D$1:$E$5,2,FALSE))

Copy that formula down as many rows in column B as necessary.

HTH

"barb" wrote:

I need help! I am trying to find the function (I think it is look-up
function) that will return a name in a cell when I type a number in another
cell. For example:
I type in the number 1 in cell A2 I want it to refer to a list of numbers
and in cell B2 return the corresponding name for that number. Can anyone
help?
I have a list of member numbers and names; I want to be able to type in the
member number and have the name automatically pop up in the adjacent cell.
Thanks!


Hal

1 Attachment(s)
Try using the Index and Match Functions instead of lookup:


"barb" wrote in message
...
I need help! I am trying to find the function (I think it is look-up
function) that will return a name in a cell when I type a number in
another
cell. For example:
I type in the number 1 in cell A2 I want it to refer to a list of numbers
and in cell B2 return the corresponding name for that number. Can anyone
help?
I have a list of member numbers and names; I want to be able to type in
the
member number and have the name automatically pop up in the adjacent cell.
Thanks!






Hal

Sorry - the formula is of course in cell D4
"Hal" wrote in message
...
Try using the Index and Match Functions instead of lookup:


"barb" wrote in message
...
I need help! I am trying to find the function (I think it is look-up
function) that will return a name in a cell when I type a number in
another
cell. For example:
I type in the number 1 in cell A2 I want it to refer to a list of numbers
and in cell B2 return the corresponding name for that number. Can anyone
help?
I have a list of member numbers and names; I want to be able to type in
the
member number and have the name automatically pop up in the adjacent
cell.
Thanks!








All times are GMT +1. The time now is 08:35 PM.

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