Text string contains or includes?

dcxkraze

New Member
Joined
Oct 20, 2005
Messages
12
Any tips on how to search a text string for keywords?

Column A is full of paragraph descriptions. Column B needs to be an if statement that determines whether column A contains the string "XXX"

Thanks for any tips

Best,

Brandon
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
XXX is a singular constant or do you, as your first sentence seems to imply, have more than one criteria?

Both the FIND() and SEARCH() functions search strings.
 
Upvote 0
If you want to find whole words only then try this in B1 copied down column

=ISNUMBER(SEARCH(" XXX "," "&A1&" "))

assumes that you have spaces between words but no punctuation
 
Upvote 0
Thanks

Thanks for your help. Ideally I am trying to search for multiple keywords, but I assume to get that type of flexibility I'll just have to use IFs and ORs.

One additional question: Search() yields either an integer or #VALUE. Is there any way to structure an if statement to get rid of #VALUE or replace it with something else?

Best,

Brandon
 
Upvote 0
Re: Thanks

dcxkraze said:
One additional question: Search() yields either an integer or #VALUE. Is there any way to structure an if statement to get rid of #VALUE or replace it with something else?

see my suggestion above, that will give TRUE or FALSE
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

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