ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find a cell's content in another cell but only as whole word(s) (https://www.excelbanter.com/excel-worksheet-functions/219211-find-cells-content-another-cell-but-only-whole-word-s.html)

Paul

Find a cell's content in another cell but only as whole word(s)
 
cell text
a1 adam takes a walk
b1 dam take
b2 adam takes

What should I use in c1 and c2 to determine that b2 is within a1 as whole
words(TRUE) but b1 is not within a1 as whole words(FALSE)?

Roger Govier[_3_]

Find a cell's content in another cell but only as whole word(s)
 
Hi Paul

I haven't done exhaustive testing, but this seems to return the result you
want
=IF(ISERROR(EXACT(FIND(B2&" ",$B$1),FIND($B$1,$B$1))),FALSE,TRUE)
--
Regards
Roger Govier

"Paul" wrote in message
...
cell text
a1 adam takes a walk
b1 dam take
b2 adam takes

What should I use in c1 and c2 to determine that b2 is within a1 as whole
words(TRUE) but b1 is not within a1 as whole words(FALSE)?



Ashish Mathur[_2_]

Find a cell's content in another cell but only as whole word(s)
 
Hi,

Try this

IF(OR(ISNUMBER(SEARCH(B1&"
",$A$1,1)),ISNUMBER(SEARCH(B1,$A$1,1)))=FALSE,"FAL SE","TRUE")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Paul" wrote in message
...
cell text
a1 adam takes a walk
b1 dam take
b2 adam takes

What should I use in c1 and c2 to determine that b2 is within a1 as whole
words(TRUE) but b1 is not within a1 as whole words(FALSE)?




All times are GMT +1. The time now is 01:01 PM.

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