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
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

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
 

Watch MrExcel Video

Forum statistics

Threads
1,118,534
Messages
5,572,741
Members
412,482
Latest member
arooshrana2
Top