VLOOKUP maybe? Search a row of text in one worksheet by comparing from another worksheet

RoseM

New Member
Joined
Oct 1, 2018
Messages
2
Hi,

I have worksheet1 with rows that contain a sentence. In another worksheet2 I have a table with Keywords that I want to look up in worksheet1 and then redefine them with worksheet2 table. I thought perhaps it would be an IF with VLOOKUP, but I'm not getting the expected result.

For example:


I want to be able to read Row 1(Summary column); compare all the words in Summary to table in Worksheet2(column1-Keyword), then replace with the Defined Value from Worksheet2 to Worksheet1 Catergory. I've tried Vlookup, contain, search, and nothing is working. Any assistance is greatly appreciated.

Worksheet1
[TABLE="width: 500"]
<tbody>[TR]
[TD]Summary[/TD]
[TD]Category[/TD]
[/TR]
[TR]
[TD]LCD is blank[/TD]
[TD]Screen[/TD]
[/TR]
[TR]
[TD]Reader is not turning on[/TD]
[TD]Card Reader[/TD]
[/TR]
</tbody>[/TABLE]

Worksheet2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Keyword[/TD]
[TD]Defined Value[/TD]
[/TR]
[TR]
[TD]LCD[/TD]
[TD]Screen[/TD]
[/TR]
[TR]
[TD]Reader[/TD]
[TD]Card Reader[/TD]
[/TR]
</tbody>[/TABLE]

Thank you.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Welcome to the forum.

I considered that more than one Keyword could exist in each Summary.

You might need to update your MSOffice software for function TEXTJOIN to work. You might also need to enter it with CTRL+Shift+Enter.

Copy B4 downwards.


Book1
AB
1Worksheet1
2Office 365
3SummaryCategory
4LCD is blankScreen
5Reader is not turning onCard Reader
6LCD wrecked the ReaderScreen, Card Reader
7Paperback writer on LCDScreen, Pencil
8Other stuff
9
10Worksheet2
11
12KeywordDefined Value
13LCDScreen
14ReaderCard Reader
15WriterPencil
16PrinterPaper
Sheet39
Cell Formulas
RangeFormula
B4=TEXTJOIN(", ",,IF(IFERROR(SEARCH($A$13:$A$16,A4),0),$B$13:$B$16,""))
 
Last edited:
Upvote 0
In B2 of Sheet1 enter and copy down to B3...

=IFERROR(LOOKUP(9.99999999999999E+307,SEARCH(" "&Sheet2!$A$2:$A$3&" "," "&$A2&" "),Sheet2!$B$2:$B$3),"")
 
Last edited:
Upvote 0
Thank you Aladin! This worked. Now I have both options from you and DRSteele. It is truly appreciated.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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