I am trying to merge/search two dataset where Searchterm from dataset 2 should be looked up in var1 for dataset 1. If any one of the search is indexed or found then it flags Y. However, it should remove the flag if any term from var1 matches anything in Excl1 to excl4 variable from dataset 2. You can see the desired output. Can any one help me with this ? Dataset 1 var1 Client Bank of America 423 Wells Fargo 232 Chase 34 American Bank 24 Bank of Japan 3453 European Bank 23 Bank of London 623 Waco Bank 553 Brazilian Bank 403.6 West California Bank 226.4 Citigroup Japan Bank 49.2 PNC Bank 128 Charles Schwab Corporation 305.2 Bank of New York Mellon 482.4 Capital One Bank 659.6 BB&T Bank 836.8 State Street Corporation Bank 1014 Discover Financial Bank 1191.2 SunTrust Bank 1368.4 M&T Bank 1545.6 Fifth Third Bank 1722.8 Dataset2 SearchTerm broad excl1 excl2 excl3 excl4 Bank Y Japan London Brazilian European America Wells Chase Waco Desired Output: var1 Client Flagged Bank of America 423 Y Wells Fargo 232 Y Chase 34 Y American Bank 24 Y Bank of Japan 3453 N European Bank 23 N Bank of London 623 N Waco Bank 553 Y Brazilian Bank 403.6 N West California Bank 226.4 Y Citigroup Japan Bank 49.2 N PNC Bank 128 Y Charles Schwab Corporation 305.2 N Bank of New York Mellon 482.4 Y Capital One Bank 659.6 Y BB&T Bank 836.8 Y State Street Corporation Bank 1014 Y Discover Financial Bank 1191.2 Y SunTrust Bank 1368.4 Y M&T Bank 1545.6 Y Fifth Third Bank 1722.8 Y
... View more