Excel, If statement with part of text matchin [Closed]

Report
Posts
1
Registration date
Friday March 26, 2010
Status
Member
Last seen
March 26, 2010
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hi,

I would like to find out an if function or VBA code that will return a certain number if parts of a cell contains the text that I'm looking for.

For example,

A B
1 Deutsche Bank AG Deutsche


If cell A1 (Deutsche Bank AG) contains cell B (Deutsche), then I want to get a value "1" in C1.


Thanks much!



1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
767
you can use FIND and SEARCH functions

=SEARCH(B1, A1,1)

=IF(ISERROR(SEARCH(B1, A1,1)), 0, 1)

etc

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!