comparing text in excel

March 14, 2011 at 15:13:26
Specs: Windows 7
Hi, this is my problem:
In cel A1 I have the following text: "cash debt stock other" (not necessarily in that order)
In cel B1 I would like to have the value 1 if the word "debt" is present in cel A1 and the value 0 otherwise.
Could somebody help me with a appropiate formula?

See More: comparing text in excel

Report •

March 14, 2011 at 17:20:51
I believe that Excel will see the content in A1 as one string of text.... I may be wrong, but Im not sure if you can have it pick one particular part out.....

You may have better luck or at least more options if the words are entered into their own cells

Report •

March 14, 2011 at 18:16:59
Use the =FIND() function to find one text string within another.

Case in sensetive.

The text string should be in cell A1

Enter the word your looking for in a blank cell such as D1

In Cell B1 enter the formula:

=IF($D1=0," ",IF(ISERROR(FIND(LOWER($D1),LOWER(A1),1)),"No","Yes"))

Modify the formula to suit your needs.


Report •

March 15, 2011 at 04:02:32
Thanks! That was exactly what I needed.

Report •

Related Solutions

Ask Question