VLOOKUP with Column Letter

Nanogirl21

Active Member
Joined
Nov 19, 2013
Messages
331
Office Version
  1. 365
Platform
  1. Windows
Is there any w/ay to write a VLOOKUP that will return the value in a specific column that is identified by a letter instead of the number of cells from a refrence point?

I hope my quiestion makes sense. I had a diffifuclt time trying to come up with the correct words

EXAMPLE:

CURRENT VLOOKUP:
Code:
=VLOOKUP(B16,Apples!B:Z,[B]17[/B],FALSE)

WANTED RESULTS SOMETHING LIKE:
Rich (BB code):
=VLOOKUP(B16,Apples!B:Z,Column R,FALSE)
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Column R's numeric position is 18, not 17.

Do you have header values in row 1 of Apples!B:Z? If so, what do you have in R1?
 
Upvote 0
Have you considered using an index and match?

I assume you want to look up based on B:B in Apples worksheet?

Code:
=index(apples!R:R,match(B16,apples!B:B,0))


If you wanted to build you could name the range (Highlight the R:R data and name it what ever you like(top left hand corner, I have named it "example")) and the B Range Data "ID"

Code:
=INDEX(example,MATCH(B16,ID,0))

This may make referring to it later much easier for you.
 
Upvote 0
Maybe...

=VLOOKUP(B16,Apples!B:Z,SEARCH(C16,"BCDEFGHIJKLMNOPQRSTUVWXYZ"),0)
where C16 contains the desired column - for example, R

M.
 
Upvote 0
Hello,

To All: was there a VLOOKUP UDF written to do this? I seems to recall something like that but can't find it yet in my search. But I may be thinking of the VLOOKUP with -X number of columns for the return value

Thanks
 
Upvote 0
@ Nanogirl21

You can also switch to a formula with MATCH using INDEX...

=INDEX(Apples!R:R,MATCH(B16,Apples!B:B,0))
 
Upvote 0
Column R's numeric position is 18, not 17.

Do you have header values in row 1 of Apples!B:Z? If so, what do you have in R1?

Yes, should be 18 not 17. That was a mistake.

I do have headers. The headers in all columns of the first row. R1 is called Comments.
 
Last edited:
Upvote 0
Not exactly what you wanted, but close enough:

=VLOOKUP(B16,Apples!B:Z,COLUMNS(B:R),FALSE)

How does this version know what column to look in? Is it always the last column refrencd in the range? If I want to use the same formula but return the value of column G would I use COLUMNS(B:G)?
 
Upvote 0
@ Nanogirl21

You can also switch to a formula with MATCH using INDEX...

=INDEX(Apples!R:R,MATCH(B16,Apples!B:B,0))




Have you considered using an index and match?

I assume you want to look up based on B:B in Apples worksheet?

Code:
=index(apples!R:R,match(B16,apples!B:B,0))


If you wanted to build you could name the range (Highlight the R:R data and name it what ever you like(top left hand corner, I have named it "example")) and the B Range Data "ID"

Code:
=INDEX(example,MATCH(B16,ID,0))

This may make referring to it later much easier for you.


I am not really familiar with the index and match process and how it exactly works. I think it would be too complicated for me to learn it with all that I have going on at the moment.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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