#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Find Text in cells

Hi
I need a formula that will confirm if certain text that is in one cell is
contained in another cell ie

Cell A1
Oranges Apples Bananas

Cell B1
Apples

Cell C1
I need a formula to return that B1 was found in A1.

The formula I'm using is
=IF(FIND(B1,A1)<"","yes","")
This works fine when the word in B1 is contained in A1 but I'm getting
#VALUE when the word is not in A1
Can anyone help?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Find Text in cells

Try this:

=IF(ISERROR(FIND(B1,A1)),"","yes")

Note that FIND is case sensitive, so "Apples" would be found, but "apples"
would not. Replacing FIND with SEARCH would ignore case.

HTH,
Elkar


"jimar" wrote:

Hi
I need a formula that will confirm if certain text that is in one cell is
contained in another cell ie

Cell A1
Oranges Apples Bananas

Cell B1
Apples

Cell C1
I need a formula to return that B1 was found in A1.

The formula I'm using is
=IF(FIND(B1,A1)<"","yes","")
This works fine when the word in B1 is contained in A1 but I'm getting
#VALUE when the word is not in A1
Can anyone help?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Find Text in cells

With

A1: Oranges Apples Bananas
and
B1: apples

This formula test if A1 contains the text from cell B1:
C1: =IF(COUNTIF(A1,"*"&B1&"*"),"Yes","")

Note: COUNTIF is NOT case-sensitive
Does that help?
***********
Regards,
Ron

XL2002, WinXP


"jimar" wrote:

Hi
I need a formula that will confirm if certain text that is in one cell is
contained in another cell ie

Cell A1
Oranges Apples Bananas

Cell B1
Apples

Cell C1
I need a formula to return that B1 was found in A1.

The formula I'm using is
=IF(FIND(B1,A1)<"","yes","")
This works fine when the word in B1 is contained in A1 but I'm getting
#VALUE when the word is not in A1
Can anyone help?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Find Text in cells

Thanks this works great

"Elkar" wrote:

Try this:

=IF(ISERROR(FIND(B1,A1)),"","yes")

Note that FIND is case sensitive, so "Apples" would be found, but "apples"
would not. Replacing FIND with SEARCH would ignore case.

HTH,
Elkar


"jimar" wrote:

Hi
I need a formula that will confirm if certain text that is in one cell is
contained in another cell ie

Cell A1
Oranges Apples Bananas

Cell B1
Apples

Cell C1
I need a formula to return that B1 was found in A1.

The formula I'm using is
=IF(FIND(B1,A1)<"","yes","")
This works fine when the word in B1 is contained in A1 but I'm getting
#VALUE when the word is not in A1
Can anyone help?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Find Text in cells

Yes it works fine. Thank you

"Ron Coderre" wrote:

With

A1: Oranges Apples Bananas
and
B1: apples

This formula test if A1 contains the text from cell B1:
C1: =IF(COUNTIF(A1,"*"&B1&"*"),"Yes","")

Note: COUNTIF is NOT case-sensitive
Does that help?
***********
Regards,
Ron

XL2002, WinXP


"jimar" wrote:

Hi
I need a formula that will confirm if certain text that is in one cell is
contained in another cell ie

Cell A1
Oranges Apples Bananas

Cell B1
Apples

Cell C1
I need a formula to return that B1 was found in A1.

The formula I'm using is
=IF(FIND(B1,A1)<"","yes","")
This works fine when the word in B1 is contained in A1 but I'm getting
#VALUE when the word is not in A1
Can anyone help?

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 can i find cells which contain certain text? Pam Deshazier, SRHS Excel Worksheet Functions 2 February 3rd 07 02:29 PM
How to find text in a range of cells? r.e.s. Excel Discussion (Misc queries) 6 January 5th 07 03:59 PM
How to find cells containing exact text, and separate them Tommy Excel Worksheet Functions 3 October 6th 06 01:49 AM
Find/Replace Text In Cells Rob Excel Discussion (Misc queries) 1 April 11th 05 04:01 AM
INTRICATE PROBLEM- How to find multiple text,excluding "H", in a multiple range of cells, then replacing 0 with another number in another cell Tourcat Excel Worksheet Functions 1 February 8th 05 06:26 PM


All times are GMT +1. The time now is 10:26 AM.

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"