can I use lokkup

colinharwood

Active Member
Joined
Jul 27, 2002
Messages
419
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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
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

JayMenon

New Member
Joined
Aug 21, 2002
Messages
19
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

colinharwood

Active Member
Joined
Jul 27, 2002
Messages
419
Office Version
  1. 2019
Platform
  1. Windows
Is it possible to modify this so that if D1 is empty E1 is blank instead of displaying #N/A

Thanks

Colin
 
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
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,191,008
Messages
5,984,134
Members
439,872
Latest member
ExcelRM

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
Top