vlookup value not in the first column

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hello there
I understand that the vlookup value has to be in the first column of the table array. What is the solution if I want to use the Vlookup and the value is in the second or third column? Any work around this? Thank you so much.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
The other way is to start the array in Vlookup from column B or column C, it is not necessary to start from A only, alternatively you could also use, index match combination instead of vlookup.
 
Upvote 0
Hi, please share an example of your data.
This can be done by using index/match formula.
Thank you
RP
 
Upvote 0
Thanks for your reply. I tried to create table like this

Name PhoneNumber Address CityName

Hi, please share an example of your data.
This can be done by using index/match formula.
Thank you
RP
 
Upvote 0
Hello there
I understand that the vlookup value has to be in the first column of the table array. What is the solution if I want to use the Vlookup and the value is in the second or third column? Any work around this? Thank you so much.

1. Control+shift+enter, not just enter:

=VLOOKUP(X2,CHOOSE({1,2},$C$2:$C$10,$A$2:$A$10),2,0)

This formula looks up X2 in C2:C10 and returns a result fro A2:A10 if successful.

2. The following is a general approach and equivalent to (1)...

=INDEX($A$2:$A$10,MATCH(X2,$C$2:$C$10,0))

which needs just enter.
 
Upvote 0
Really nice, thank you.

Which of the two methods uses resources (i.e. is INDEX or MATCH volatile and requires Excel to refresh every referenced cell etc.)
 
Upvote 0
Thanks, so is INDFEX volatile, or not?

"A number of functions that are documented by Microsoft as volatile do not actually seem to be volatile when tested:
INDEX(), ROWS(), COLUMNS(), AREAS()"

I guess #1 is more of a resource hog, as it is an array, right?
 
Upvote 0

Forum statistics

Threads
1,203,488
Messages
6,055,716
Members
444,811
Latest member
NotJack

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