ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using RIGHT function in a VLOOKUP (https://www.excelbanter.com/excel-discussion-misc-queries/90549-using-right-function-vlookup.html)

rudy

Using RIGHT function in a VLOOKUP
 

I have been trying to use the RIGHT function in a VLOOKUP and can not
get it to work. For example if my VLOOKUP is

=VLOOKUP(A16,A8:E8,5,FALSE)

In the range I am looking at I only want to look at the right 2
characters in column A.

If cell A8 is M200612 I only want to look for the 12.

Does anyone know how to do this???

Thanks.


--
rudy
------------------------------------------------------------------------
rudy's Profile: http://www.excelforum.com/member.php...o&userid=33911
View this thread: http://www.excelforum.com/showthread...hreadid=545574


Bob Phillips

Using RIGHT function in a VLOOKUP
 
Try it as you said it

=VLOOKUP(RIGHT(A16,2),A8:E8,5,FALSE)


--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"rudy" wrote in message
...

I have been trying to use the RIGHT function in a VLOOKUP and can not
get it to work. For example if my VLOOKUP is

=VLOOKUP(A16,A8:E8,5,FALSE)

In the range I am looking at I only want to look at the right 2
characters in column A.

If cell A8 is M200612 I only want to look for the 12.

Does anyone know how to do this???

Thanks.


--
rudy
------------------------------------------------------------------------
rudy's Profile:

http://www.excelforum.com/member.php...o&userid=33911
View this thread: http://www.excelforum.com/showthread...hreadid=545574




rudy

Using RIGHT function in a VLOOKUP
 

I actually need to apply the RIGHT,2 condition to the range I am look
at, not the value I am looking for.

Thanks.


--
rudy
------------------------------------------------------------------------
rudy's Profile: http://www.excelforum.com/member.php...o&userid=33911
View this thread: http://www.excelforum.com/showthread...hreadid=545574


Dave Peterson

Using RIGHT function in a VLOOKUP
 
I'm confused why you're only looking at one row--but maybe that's a typo in the
newsgroup post.

=INDEX(E8:E15,MATCH(A16,RIGHT(A8:A15,2),0))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.



rudy wrote:

I have been trying to use the RIGHT function in a VLOOKUP and can not
get it to work. For example if my VLOOKUP is

=VLOOKUP(A16,A8:E8,5,FALSE)

In the range I am looking at I only want to look at the right 2
characters in column A.

If cell A8 is M200612 I only want to look for the 12.

Does anyone know how to do this???

Thanks.

--
rudy
------------------------------------------------------------------------
rudy's Profile: http://www.excelforum.com/member.php...o&userid=33911
View this thread: http://www.excelforum.com/showthread...hreadid=545574


--

Dave Peterson

Bob Phillips

Using RIGHT function in a VLOOKUP
 
Sorry, it's a number, so try

=VLOOKUP(--RIGHT(A16,2),A16,2),A8:E8,5,FALSE)

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"rudy" wrote in message
...

I actually need to apply the RIGHT,2 condition to the range I am look
at, not the value I am looking for.

Thanks.


--
rudy
------------------------------------------------------------------------
rudy's Profile:

http://www.excelforum.com/member.php...o&userid=33911
View this thread: http://www.excelforum.com/showthread...hreadid=545574





All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com