ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Logical statement for 'contains' ? (https://www.excelbanter.com/excel-discussion-misc-queries/187740-logical-statement-contains.html)

Singh

Logical statement for 'contains' ?
 
Is there a logical statement to return 'True' if one cell contains the
contents of another (and maybe more).

E.g.
Cell 1 = 12345
Cell 2 = 123456789
Cell 3 = 987654321

Logical statement would return true for cell 1 against 2, but not for cell 1
against 3.

Thanks.

Don Guillett

Logical statement for 'contains' ?
 
Where j5 is what you seek

=IF(ISERR(FIND($J$5,J6)),"no","yes") yes
=IF(ISERR(FIND($J$5,J7)),"no","yes") no
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Singh" wrote in message
...
Is there a logical statement to return 'True' if one cell contains the
contents of another (and maybe more).

E.g.
Cell 1 = 12345
Cell 2 = 123456789
Cell 3 = 987654321

Logical statement would return true for cell 1 against 2, but not for cell
1
against 3.

Thanks.




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

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