#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Vlookup Question

My lookup table is like this:

LookUpTable
OLAF0009
OLAF0050
OLAF0325

The data table looks like this:

DataTable
009F0OLA
050F0OLA
325F0OLA

Can a VLOOKUP compare the last 3 characters of the data table with the first
3 characters of the lookup table ?

Thank you in advance.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Vlookup Question

I would insert a new column A in the table worksheet and extract the first 3
characters of the key column:

=left(b1,3)
and drag down.

Then use:

=vlookup(right(a2,3),sheet2!a:c,3,false)

But you could use an array formula like:
=INDEX(Sheet2!B1:B100,MATCH(RIGHT(A2,3),LEFT(Sheet 2!A1:A100,3),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.

carl wrote:

My lookup table is like this:

LookUpTable
OLAF0009
OLAF0050
OLAF0325

The data table looks like this:

DataTable
009F0OLA
050F0OLA
325F0OLA

Can a VLOOKUP compare the last 3 characters of the data table with the first
3 characters of the lookup table ?

Thank you in advance.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup question Greegan Excel Worksheet Functions 3 December 20th 05 04:00 AM
VLOOKUP() Question... i hope Adam Kroger Excel Discussion (Misc queries) 2 November 29th 05 10:22 PM
Vlookup question please Bob Newman Excel Worksheet Functions 3 March 17th 05 02:17 PM
vlookup question please Bob Newman Excel Worksheet Functions 1 March 17th 05 06:25 AM
Vlookup against multiple columns/worksheets question JCarter Excel Discussion (Misc queries) 8 March 9th 05 04:59 PM


All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"