Lookup Matching Word Within A Sentence

zakmuh

New Member
Joined
Apr 24, 2014
Messages
31
Hi All,

I need help with a formula please. I want find the matching word within a sentence (within one cell).

For example:

From Column A (A4:A7) 'Ninja Electric Hob', I want to lookup the exact matching word (not partial match) 'Ninja' from Column C (C4:C7) and return the exact matching Title in Column E.

I've attached a screenshot from Excel.

Thanks

Zak
 

Attachments

  • 1.JPG
    1.JPG
    40.6 KB · Views: 63

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
The best I could do was this one and that's based on 'partial match'

=unique(if(isblank(A4:A7),"",(IFERROR(VLOOKUP("*"&C4&"*",$A$4:$A7,1,FALSE),"")))) - used the formula for each cell

Issue here is, for vero keyword 'shark', it returns 'Baby play mat Sharkins' and picks the first one on the list, not the correct one below that

Ninja Electric Hob
Myninja Colouring Book
Baby play mat Sharkins
Shark Vacuum Cleaner
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDE
1
2
3
4Ninja Electric Hobabc 
5Myninja Colouring BookNinjaNinja Electric Hob
6Baby play mat SharkinsSharkShark Vacuum Cleaner
7Shark Vacuum Cleanerxyz 
8
W-1
Cell Formulas
RangeFormula
E4:E7E4=IFERROR(TRIM(VLOOKUP("* "&C4&" *"," "&$A$4:$A$7&" ",1,FALSE)),"")
 
Upvote 0
Hi,

Is this what you need?

Book3.xlsx
ABCDE
1
2
3
4Ninja Electric HobABC 
5Myninja Colouring BookNinjaNinja Electric Hob
6Baby play mat SharkinsCool 
7Shark Vacuum CleanerSharkShark Vacuum Cleaner
Sheet842
Cell Formulas
RangeFormula
E4:E7E4=IFERROR(LOOKUP(2,1/SEARCH(" "&C4&" "," "&A$4:A$7&" "),A$4:A$7),"")
 
Upvote 0
How about
+Fluff 1.xlsm
ABCDE
1
2
3
4Ninja Electric Hobabc 
5Myninja Colouring BookNinjaNinja Electric Hob
6Baby play mat SharkinsSharkShark Vacuum Cleaner
7Shark Vacuum Cleanerxyz 
8
W-1
Cell Formulas
RangeFormula
E4:E7E4=IFERROR(TRIM(VLOOKUP("* "&C4&" *"," "&$A$4:$A$7&" ",1,FALSE)),"")
Thanks for your quick reply Fluff

Your formula only returns if the Vero keywords is exactly on the same row (A7 and C7). Please see attached screenshot.
Formula wouldn't return 'Ninja', as ninja is not on the same row (A4 and C5)

Have a solution?
 

Attachments

  • 1A.JPG
    1A.JPG
    40.9 KB · Views: 13
Upvote 0
It returns it on the same row as the values in col C, which is what your code was doing.
 
Upvote 0
Hi,

Is this what you need?

Book3.xlsx
ABCDE
1
2
3
4Ninja Electric HobABC 
5Myninja Colouring BookNinjaNinja Electric Hob
6Baby play mat SharkinsCool 
7Shark Vacuum CleanerSharkShark Vacuum Cleaner
Sheet842
Cell Formulas
RangeFormula
E4:E7E4=IFERROR(LOOKUP(2,1/SEARCH(" "&C4&" "," "&A$4:A$7&" "),A$4:A$7),"")
Hi Jtakw

Yes yes, thats exactly how I wanted it but its not seems to be working on mine. Cells are empty? Please advice
 

Attachments

  • 1B.JPG
    1B.JPG
    43.7 KB · Views: 20
Upvote 0
Hi Jtakw

Yes yes, thats exactly how I wanted it but its not seems to be working on mine. Cells are empty? Please advice

Hmmm...it's working for me...

Book3.xlsx
ABCDE
4Ninja Electric HobABC 
5Myninja Colouring BookNinjaNinja Electric Hob
6Baby play mat SharkinsSharkShark Vacuum Cleaner
7Shark Vacuum CleanerXZY 
Sheet842
Cell Formulas
RangeFormula
E4:E7E4=IFERROR(LOOKUP(2,1/SEARCH(" "&C4&" "," "&A$4:A$7&" "),A$4:A$7),"")
 
Upvote 0

Forum statistics

Threads
1,223,601
Messages
6,173,293
Members
452,508
Latest member
SaltySquid

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