Need help with IF function

  • Thread starter Thread starter broken
  • Start date Start date
B

broken

Is there any way for me to run an IF function that meets the following
criteria:

If column C INCLUDES the word "German", then return "German" in this
cell.

Right now I have =IF(C:C="German","German", 0), but it's not working.

The problem is that column C is a long string of text that may or may
not include the word German anywhere in the text string. The text is
seperated by colons so I could break the column out into multiple
columns, but the word "German" doesn't always appear in the same node
of the text string.

blah : blah : German : blah
Blah : German : blah : blah

And just curious, is there a way to run the following:
If column C doesn't include "English", return "Other" ??

Any assistance would be greatly appreciated!
Thanks.
 
Do you mean one cell?
=if(countif(c1,"*German*")>0,"German",0)

Or all cells:
=if(countif(c:c,"*German*")>0,"German",0)


And similarly:

=if(countif(c1,"*English*")=0,"Other","English")
 
For the German part, try this:

=IF(COUNTIF(C:C,"*German*")>0,"German",0)

For the English part, similarly:

=IF(COUNTIF(C:C,"*English*")=0,"Other",0)
 
There maybe a more elegant solution but meantime, this should work fo
you:

<< Is there any way for me to run an IF function that meets th
following
criteria:

If column C INCLUDES the word "German", then return "German" in this
cell.

Right now I have =IF(C:C="German","German", 0), but it's not working.

The problem is that column C is a long string of text that may or may
not include the word German anywhere in the text string. The text is
seperated by colons so I could break the column out into multiple
columns, but the word "German" doesn't always appear in the same node
of the text string.

blah : blah : German : blah
Blah : German : blah : blah >>

=IF(SUMPRODUCT(--(ISNUMBER(SEARCH(\"GERMAN\",C1:C100))))>0,\"GERMAN\",0

<< And just curious, is there a way to run the following:
If column C doesn't include "English", return "Other" ?? >>

=IF(SUMPRODUCT(--(ISNUMBER(SEARCH(\"ENGLISH\",C1:C100))))=0,\"OTHER\",\"\"

The second formula will return a blank if the word "English" is foun
in Column C.

As I mentioned earlier, there might be a more elegant (and also
efficient) formula for your situation. BTW, out of curiosity ... wha
result would you like to have IF the word "German" is found in th
column AND the word "English" is not in the column?

Regards
 
Back
Top