How to find Multiple Keywords in one cell and Return Multiple Results for each

atorres05

New Member
Joined
Jun 25, 2015
Messages
5
Hey guys and gals,

First time posting... I don't even know if this is possible but I know I'm not the man to figure it out.
I want to search a single cell (A1) for three different keywords and return a corresponding value for each keyword found using nested IF functions.

This is what I have so far:
=IF(ISNUMBER(FIND("Keyboard", A1)), "one", IF(ISNUMBER(FIND("laptop", A1)),"two",IF(ISNUMBER(FIND("desk", A1)),"three")))

A1 contains all three keywords but when I run the function it only picks up the first keyword and returns "one". Should I be using an AND function somewhere in this crazy mess?

Thanks so much guys.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Am guessing at the exact logic you are after, but what about:
=IF(ISNUMBER(FIND("Keyboard", A1)), "one ") & IF(ISNUMBER(FIND("laptop", A1)),"two ") & IF(ISNUMBER(FIND("desk", A1)),"three")))
 
Upvote 0
This is exactly what I need, thank you very much!

Only thing is now the function returns FALSE if it does not find one of the keywords in the target cell.
For example: FALSE two three

What do I have to change so it returns nothing if it does not find one of the keywords. So, just "two three" if 'Keyboard' is not found.
 
Upvote 0
Sorry, stupid question. I figured it out right away.

=IF(ISNUMBER(FIND("Keyboard",A1)),"one "," ")&IF(ISNUMBER(FIND("laptop",A1)),"two "," ")&IF(ISNUMBER(FIND("desk",A1)),"three "," ")
 
Upvote 0
Here is another formula you can use...

Code:
=IFERROR(CHOOSE((8+SEARCH(A1,"keyboard,laptop  ,desk"))/9,"one","two","three"),"")

Note: There are 8 total characters for the first two words in the first quoted text string (spaces are used to fill out the 8 characters when the word is shorter than 8 total characters)... the last word does not need to be filled out to 8 characters because it comes at the end of the text.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,711
Messages
6,174,029
Members
452,542
Latest member
Bricklin

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