3 Way Lookup By splitting the Cell value

LizaRon

New Member
Item1
Item2
Item3
N1
N2
B
C
D
XX
MM
C
A
A
YY
NN
A
E
D
WW
OO
A
B
C
ZZ
PP

<tbody>
</tbody>
Item_Name
F_Name
L_Name
A-B-C
ZZ
PP
C-A-A
YY
NN
B-C-C
XX
MM
A-E-D
WW
OO

<tbody>
</tbody>


I have a data which is the Table-1 in one sheet and in another sheet i have a data With Table - 2 only Item_Name
column has a data, I need to fill the F_Name and L_Name column data by spilting the values in Item_Name and
comparing with Item1, Item2 & Item3 if all the three values match return the N1 and N2 coulmn values to F_Name and L_Name for that particular Item Name
 
Last edited:

mfexcel

Well-known Member
Item1Item2Item3N1N2
BCDXXMM
CAAYYNN
AEDWWOO
ABCZZPP
Item_NameF_NameL_Name
A-B-CZZPP
C-A-AYYNN
B-C-C#N/A#N/A
A-E-DWWOO

<tbody>
</tbody>

'where A1:E5 refers Table 1; A7:C11 refers to Table 2

In Cell B8
=VLOOKUP($A8,CHOOSE({1,2},$A$2:$A$5&"-"&$B$2:$B$5&"-"&$C$2:$C$5,D$2:D$5),2,FALSE)
CTRL SHIFT ENTER
'copy down and across

btw, you have no B-C-C in Table 1

Here's a post of related topic for your reference:
Perform VLOOKUP with 2 lookup values | wmfexcel
 
Last edited:

LizaRon

New Member
But i have those data in A8 already , i want a fromula for B8 and C8 cell , Initially i tried to split the data in A8 using find, mid , left functions and compared tat with A2:A5, B2:B5 and C2:C5 , but tat dint give me D and E values, the above logic is not working for me
 
Last edited:

mfexcel

Well-known Member
I know you have data in A8, that's why the formula is intended in B8
Did you input by CTRL SHIFT ENTER?
It works fine at my side.


But i have those data in A8 already , i want a fromula for B8 and C8 cell , Initially i tried to split the data in A8 using find, mid , left functions and compared tat with A2:A5, B2:B5 and C2:C5 , but tat dint give me D and E values, the above logic is not working for me
 

Some videos you may like

This Week's Hot Topics

  • Get External Data (long shot question!)
    This is likely a long shot but I am wondering if it is at all possible for Excel to somehow 'change' the contents of a URL that is being linked to...
  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • Cell Formatting
    Good Morning, I need to format a few different cells in the following manners: A1 has to always add a colon (:) after whatever is typed in by a...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • Workbook_Change stopped working !
    I am working on an app to speed up & automate processing of Credit Cards statements. After data is input from a CSV file, it is presented to the...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
Top