Multiple Criteria lookup and return text

jmewebb

New Member
Joined
Dec 6, 2012
Messages
43
Office Version
  1. 365
Platform
  1. Windows
Current Text (A)Desired Lookup Result (B)
green appleapple
red appleapple
brown bananabanana
yellow bananabanana
yellow strawberrystrawberry
red strawberrystrawberry

<tbody>
</tbody>

Column A contains extended text with the key word. I want to return the key word in column B. I have three keys words I am searching for in the data.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
For an entry in cell A2 (formula to put in cell B2 and copy down):
Code:
=IF(ISNUMBER(SEARCH("apple",A2)),"apple",IF(ISNUMBER(SEARCH("banana",A2)),"banana",IF(ISNUMBER(SEARCH("strawberry",A2)),"strawberry","")))
 
Upvote 0
Another way.

You can try this too:

=IFERROR(LOOKUP(1,1/SEARCH(" "&$D$2:$D$4&" "," "&A2&" "),$D$2:$D$4),"")

ABCDE
1Current Text (A)Desired Lookup Result (B)List
2green appleappleapple
3red appleapplebanana
4brown bananabananastrawberry
5yellow bananabanana
6yellow strawberrystrawberry
7red strawberrystrawberry
8
*********************************************************************

<tbody>
</tbody>

Markmzz
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

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