certain words "CONTAINS" in an free text cell...........

B

Beverly C

Everyone has been so much help. I've got one more question -- and I'm not
going to promise you it will be my last. :)

I have a free text comment cell that I need to search for certain words.

=SUMPRODUCT(--('Survey Data'!C2:C500="Bell"),--('Survey
Data'!J2:J500"contains the words optional exam"))

I need to put in the code that will search for the words "optional exam"
within a free text cell.

Any help would be gladly appreciated.
 
D

Dave Peterson

=sumproduct(--('Survey Data'!C2:C500="Bell"),
--isnumber(search("optional exam",'Survey Data'!J2:J500)))

If you want it to be case sensitive, use Find instead of Search.
 
D

Dave F

Does it only contain "optional exam"? Or does it contain those words, along
with other words?


=SEARCH("optinal exam",A1) will return 1 if the words "optional exam" are in
A1.

Dave
 
Top