can I use lokkup

colinharwood

Active Member
Joined
Jul 27, 2002
Messages
426
Office Version
  1. 2019
Platform
  1. Windows
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
 
Upvote 0
Hi !

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

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

Thanks

Colin
 
Upvote 0
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),"")
 
Upvote 0

Forum statistics

Threads
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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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