ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   "Alert" only if 'not contained in' (https://www.excelbanter.com/excel-worksheet-functions/250646-alert-only-if-not-contained.html)

Steve

"Alert" only if 'not contained in'
 
I have 2 separate name data downloads.
One in column A, the other in Column B
A B C
Smith Smith, Alex IF(A2=B2,"", "ALERT")

I really only need C to produce the alert if a different name is in A, and
therefore want the above sample to result in ""
Can a/the formula show in C something like...
If all of A is contained in B, then "", "Alert").
Thanks,

Steve


T. Valko

"Alert" only if 'not contained in'
 
Try one of these:

=IF(COUNTIF(B2,"*"&A2&"*"),"","Alert")

=IF(ISNUMBER(SEARCH(A2,B2)),"","Alert")

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have 2 separate name data downloads.
One in column A, the other in Column B
A B C
Smith Smith, Alex IF(A2=B2,"", "ALERT")

I really only need C to produce the alert if a different name is in A, and
therefore want the above sample to result in ""
Can a/the formula show in C something like...
If all of A is contained in B, then "", "Alert").
Thanks,

Steve




Steve

"Alert" only if 'not contained in'
 
Perfect. Thanks much. Both worked great.

Steve

"T. Valko" wrote:

Try one of these:

=IF(COUNTIF(B2,"*"&A2&"*"),"","Alert")

=IF(ISNUMBER(SEARCH(A2,B2)),"","Alert")

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have 2 separate name data downloads.
One in column A, the other in Column B
A B C
Smith Smith, Alex IF(A2=B2,"", "ALERT")

I really only need C to produce the alert if a different name is in A, and
therefore want the above sample to result in ""
Can a/the formula show in C something like...
If all of A is contained in B, then "", "Alert").
Thanks,

Steve



.


T. Valko

"Alert" only if 'not contained in'
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
Perfect. Thanks much. Both worked great.

Steve

"T. Valko" wrote:

Try one of these:

=IF(COUNTIF(B2,"*"&A2&"*"),"","Alert")

=IF(ISNUMBER(SEARCH(A2,B2)),"","Alert")

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have 2 separate name data downloads.
One in column A, the other in Column B
A B C
Smith Smith, Alex IF(A2=B2,"", "ALERT")

I really only need C to produce the alert if a different name is in A,
and
therefore want the above sample to result in ""
Can a/the formula show in C something like...
If all of A is contained in B, then "", "Alert").
Thanks,

Steve



.





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

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