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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

nbrcrunch

Well-known Member
Joined
Jan 1, 2003
Messages
2,062
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.
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
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
 

dcxkraze

New Member
Joined
Oct 20, 2005
Messages
12
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
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,018
Messages
5,834,976
Members
430,331
Latest member
Syed Yasir Hannan

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
Top