Detecting a text string in a range of cells

  • Thread starter Thread starter Chris R. Lee
  • Start date Start date
C

Chris R. Lee

I know it should be easy, but how do you code:

IF(OR(A10:D10 [contain an occurence of] "mystring";A10:D10 [contain an
occurrence of] "myOtherstring");dothis;dothat).

There are various functions that do similar things in a complicated way, but
there I can't find anything as direct as the term in square brackets above.

Regards
 
=IF((COUNTIF(A1:H20,"*abc*")+COUNTIF(A1:H20,"*def*"))>0,"yes","no")

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



Chris R. Lee said:
I know it should be easy, but how do you code:

IF(OR(A10:D10 [contain an occurence of] "mystring";A10:D10 [contain an
occurrence of] "myOtherstring");dothis;dothat).

There are various functions that do similar things in a complicated way, but
there I can't find anything as direct as the term in square brackets above.

Regards
 
Back
Top