Returning a value for two lookup columns (without a concatenate)

JMatBoS

New Member
Joined
Nov 26, 2015
Messages
3
I have a lookup table of this format:
ABC
1Apples, Pears, WatermelonsGreen123
2ApplesRed456

<tbody>
</tbody>

I need the data represented in the target table as below. Column A can contain multiple values that will appear as separate row names in the target table. Column B will have single values which will match the column names in the target table.
ABC
1GreenRed
2Apples123456
3Watermelons123

<tbody>
</tbody>


I can use a vlookup with wildcard to get the value for column A but I'm struggling to add the match to column B.

Thanks in advance
456

<tbody>
</tbody>
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Maybe something likes this: =SUMPRODUCT((ISNUMBER(SEARCH($A2,$A$1:$A$2)))*(B$1=$B$1:$B$2)*$C$1:$C$2)
 
Upvote 0
Let's A:C of Sheet1 house the data.

In B2 of Sheet2 enter, copy across, and down:

=SUMIFS(Sheet1!$C$1:$C$2,Sheet1!$A$1:$A$2,"*"&$A2&"*",Sheet1!$B$1:$B$2,B$1)
 
Upvote 0
Thanks. Unfortunately the facts aren't actually numeric. They are actually names. Replace 123 with Mr X and 456 with Mrs Y
 
Upvote 0
Thanks. Unfortunately the facts aren't actually numeric. They are actually names. Replace 123 with Mr X and 456 with Mrs Y

So you learned something valuable...

In B2 of Sheet2 control+shift+enter, not just enter, copy across, and down:

=IFERROR(INDEX(Sheet1!$C$1:$C$2,MATCH("*"&$A2&"*",IF(Sheet1!$B$1:$B$2=B$1,Sheet1!$A$1:$A$2),0)),"")
 
Upvote 0

Forum statistics

Threads
1,215,276
Messages
6,124,006
Members
449,137
Latest member
abdahsankhan

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