Find value within a cell with multiple text separated by comma

Bav_2030

New Member
Joined
Nov 18, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a column which contains several text separated by commas. I'm trying to see if it would be possible to have a formula which looks at the values in-between
the commas and if that value is found on sheet 2 it will display its corresponding value from column two

I don't even know if this would be possible to achieve but thought to ask in case someone has any pointers or tips to help with this - many thanks in advance.

RowList of itemsExpected result
2Book, Bag, HatBlue, Red, Yellow
3HatYellow
4Gloves, BagBlack, Red
5Pen, Marker, HatPink, Orange, Yellow
6MarkerOrange
7BagRed
8Book, GlovesBlue
9RulerWhite
10StampGreen


Sheet 2

ItemColour
BookBlue
BagRed
HatYellow
GlovesBlack
MarkerOrange
RulerWhite
StampGreen
PenPink
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about
Fluff.xlsm
AB
1List of itemsExpected result
2Book, Bag, HatBlue, Red, Yellow
3HatYellow
4Gloves, BagBlack, Red
5Pen, Marker, HatPink, Orange, Yellow
6MarkerOrange
7BagRed
8Book, GlovesBlue, Black
9RulerWhite
10StampGreen
11
12
13
14
15ItemColour
16BookBlue
17BagRed
18HatYellow
19GlovesBlack
20MarkerOrange
21RulerWhite
22StampGreen
23PenPink
24
Lists
Cell Formulas
RangeFormula
B2:B10B2=TEXTJOIN(", ",,VLOOKUP(TRIM(TEXTSPLIT(A2,",")),$A$16:$B$23,2,0))
 
Upvote 0
Solution
How about
Fluff.xlsm
AB
1List of itemsExpected result
2Book, Bag, HatBlue, Red, Yellow
3HatYellow
4Gloves, BagBlack, Red
5Pen, Marker, HatPink, Orange, Yellow
6MarkerOrange
7BagRed
8Book, GlovesBlue, Black
9RulerWhite
10StampGreen
11
12
13
14
15ItemColour
16BookBlue
17BagRed
18HatYellow
19GlovesBlack
20MarkerOrange
21RulerWhite
22StampGreen
23PenPink
24
Lists
Cell Formulas
RangeFormula
B2:B10B2=TEXTJOIN(", ",,VLOOKUP(TRIM(TEXTSPLIT(A2,",")),$A$16:$B$23,2,0))
It works like a gem!, thank you thank you!😀

I can't tell you how much you've helped me today and saved me from a very painful task 😅
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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