ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   certain words "CONTAINS" in an free text cell........... (https://www.excelbanter.com/excel-discussion-misc-queries/129414-certain-words-contains-free-text-cell.html)

Beverly C

certain words "CONTAINS" in an free text cell...........
 
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.

--
Beverly C.

Dave Peterson

certain words "CONTAINS" in an free text cell...........
 
=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.

Beverly C wrote:

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.

--
Beverly C.


--

Dave Peterson

Dave F

certain words "CONTAINS" in an free text cell...........
 
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
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Beverly C" wrote:

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.

--
Beverly C.



All times are GMT +1. The time now is 09:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com