Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
thekovinc
 
Posts: n/a
Default Finding a Keyword in a Cell


If I have a group of cells that have different text strings in them
(differing in length as well), is there any easy way to write a formula
that will tell if the cells have a certain word at any point in the
string?

i.e. if I am looking to flag any cells with the word "exempt" in them,
how could you write a formula that would pick up if "exempt" were in
the beginning, end, or somewhere in the middle of the cell?

Thanks,
Nick


--
thekovinc
------------------------------------------------------------------------
thekovinc's Profile: http://www.excelforum.com/member.php...o&userid=29378
View this thread: http://www.excelforum.com/showthread...hreadid=543368

  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Finding a Keyword in a Cell

Select cell A1 and pull-down:
Format Conditional formating... Equation is
=ISNUMBER(SEARCH("exempt",A1)) and pick a nice format

Then copy the cell and paste/special format over the cells you want to
investigate
--
Gary's Student


"thekovinc" wrote:


If I have a group of cells that have different text strings in them
(differing in length as well), is there any easy way to write a formula
that will tell if the cells have a certain word at any point in the
string?

i.e. if I am looking to flag any cells with the word "exempt" in them,
how could you write a formula that would pick up if "exempt" were in
the beginning, end, or somewhere in the middle of the cell?

Thanks,
Nick


--
thekovinc
------------------------------------------------------------------------
thekovinc's Profile: http://www.excelforum.com/member.php...o&userid=29378
View this thread: http://www.excelforum.com/showthread...hreadid=543368


  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Finding a Keyword in a Cell

The SEARCH and FIND functions will do this for you- SEARCH is not case
sensitive, while FIND is case sensitive. In your example if the word
"exempt" does not appear in the cell, both SEARCH and FIND will return
an error message, so you may need to nest them into an IF statement:
=IF(ISNUMBER(SEARCH(A1,"exempt",1)),"Exempt","")
....to avoid the error.

  #4   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default Finding a Keyword in a Cell

"thekovinc" wrote
in message ...

If I have a group of cells that have different text strings in them
(differing in length as well), is there any easy way to write a formula
that will tell if the cells have a certain word at any point in the
string?

i.e. if I am looking to flag any cells with the word "exempt" in them,
how could you write a formula that would pick up if "exempt" were in
the beginning, end, or somewhere in the middle of the cell?


=ISNUMBER(FIND("exempt",A1)) will return true or false and is case
sensitive.
=ISNUMBER(SEARCH("exempt",A1)) if you don't want it case sensitive.
--
David Biddulph


  #5   Report Post  
Posted to microsoft.public.excel.misc
thekovinc
 
Posts: n/a
Default Finding a Keyword in a Cell


Thank you very much!


--
thekovinc
------------------------------------------------------------------------
thekovinc's Profile: http://www.excelforum.com/member.php...o&userid=29378
View this thread: http://www.excelforum.com/showthread...hreadid=543368



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"