# can I use lokkup

#### colinharwood

##### Active Member
Hi
The problem I have is:
In Col A are numbers 1:20
In Col B are 20 Names

Can I use a formula which will allow to enter a number between 1:20 in cell D1, which will look up that number Col A and put the corresponding name in Col B into cell E1

Thanks a lot

Colin

### Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
On 2002-08-25 08:00, colinharwood wrote:
Hi
The problem I have is:
In Col A are numbers 1:20
In Col B are 20 Names

Can I use a formula which will allow to enter a number between 1:20 in cell D1, which will look up that number Col A and put the corresponding name in Col B into cell E1

Thanks a lot

Colin

In E1 enter one of:

=VLOOKUP(D1,A1:B20,2,0)

=INDEX(B1:B20,MATCH(D1,A1:A20,0))

Consult also the Help file on these functions.

Note. 0 means the same thing to Excel as FALSE (and 1 --> TRUE).

Addendum. If A1:A20 is sorted in ascending order and there is no gap in sequence 1 to 20, you can omit the 0 (FALSE) arg.
This message was edited by aladin akyurek on 2002-08-25 08:37

Hi !

[1] Enter =VLOOKUP(D1,A1:B21),2,FALSE) in E1
[2] Please ensure the Col A is sorted in Ascendiing order.

Thanks

Thanks everyone

Colin

Is it possible to modify this so that if D1 is empty E1 is blank instead of displaying #N/A

Thanks

Colin

Hi !!

Try this :-

=IF(D1=0,"",VLOOKUP(D1,A1:B21,2,FALSE))

Thanks

On 2002-08-25 09:12, colinharwood wrote:
Is it possible to modify this so that if D1 is empty E1 is blank instead of displaying #N/A

Thanks

Colin

=IF(D1,VLOOKUP(D1,A1:B20,2,0),"")

=IF(D1,VLOOKUP(D1,A1:B20,2),"")

Thanks everyone

Colin

Replies
2
Views
101
Replies
7
Views
165
Replies
2
Views
425
Replies
9
Views
203
Replies
2
Views
465

1,221,525
Messages
6,160,329
Members
451,637
Latest member
hvp2262

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back