Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default Search text in a cell

If I have a sentence in a cell, what code can I use to search a word in that
cell?
Eg: A1: "I am happy"
I want to test if A1 has the word "happy" in it.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Search text in a cell

One way:

=ISNUMBER(SEARCH("happy",A1))

Will return either TRUE (yes it does) or FALSE (no it doesn't)

Biff

"J@Y" wrote in message
...
If I have a sentence in a cell, what code can I use to search a word in
that
cell?
Eg: A1: "I am happy"
I want to test if A1 has the word "happy" in it.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Search text in a cell

I used VLOOKUP to search for a keyword and it works great.


On Jun 14, 1:28 pm, "T. Valko" wrote:
One way:

=ISNUMBER(SEARCH("happy",A1))

Will return either TRUE (yes it does) or FALSE (no it doesn't)

Biff

"J@Y" wrote in message

...

If I have a sentence in a cell, what code can I use to search a word in
that
cell?
Eg: A1: "I am happy"
I want to test if A1 has the word "happy" in it.



  #4   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Search text in a cell

Another way...........

=MID(A1,FIND("happy",A1,1),5)

Vaya con Dios,
Chuck, CABGx3



"J@Y" wrote:

If I have a sentence in a cell, what code can I use to search a word in that
cell?
Eg: A1: "I am happy"
I want to test if A1 has the word "happy" in it.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Search text in a cell

Another one:

=if(countif(a1,"*happy*")0,"yep","nope")


J@Y wrote:

If I have a sentence in a cell, what code can I use to search a word in that
cell?
Eg: A1: "I am happy"
I want to test if A1 has the word "happy" in it.


--

Dave Peterson
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
How to search for text within a cell? Eric Excel Discussion (Misc queries) 9 May 13th 07 04:30 PM
Search text within cell [email protected] Excel Worksheet Functions 2 July 21st 06 02:17 PM
How do I search for specific text and sum the cell to the right? PacRat2001 Excel Worksheet Functions 3 October 12th 05 04:21 AM
How can I search for more than one text character in a cell? Dolores Excel Worksheet Functions 3 May 19th 05 09:44 PM
How do I search for more than one text character in one cell? Dolores Excel Worksheet Functions 0 May 19th 05 06:54 PM


All times are GMT +1. The time now is 05:52 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"