Excel function where if any row values in column A include a keyword from the list in column D but does not include a keyword from the list in column E, write True, otherwise, write nothing/keep it blank.
Attempts:=IF(SUMPRODUCT(--(NOT(ISERR(SEARCH($D$2:$D$3, A2)))) * (ISERR(SEARCH($E$2:$E$3, A2)))) > 0, "True", "")
This does not work but if the Exclude is singular and not a list, it does:=IF(SUMPRODUCT(--(NOT(ISERR(SEARCH($D$2:$D$3, A2)))) * (ISERR(SEARCH($E$2, A2)))) > 0, "True", "")
Also tried:=IF(SUMPRODUCT(--(NOT(ISERR(SEARCH($D$2:$D$3, A2)))) * (ISERR(SEARCH({"FFCD, "VVC"}, A2)))) > 0, "True", "")
But curly brackets don't seem to do anything and I prefer to have the keywords in a list for easier changeability.
Copilot:=IF(AND(ISNUMBER(SEARCH(N2:N18, B2)), NOT(ISNUMBER(SEARCH(O2, B2)))), "True", "")This gave me hope and then made me lose it just as quickly.
chatGPT:=IF(AND(SUMPRODUCT(--ISNUMBER(SEARCH(D$2:D$4,A2))), SUMPRODUCT(--ISNUMBER(SEARCH(E$2:E$4,A2)))=0), "TRUE", "")Didn't work either
Tried referencing, but got lost in it. If someone can figure out what I should put into the TABLE1 space, aka. paste their function, that would be helpful.https://stackoverflow.com/questions/77403773/how-do-i-filter-a-column-with-a-keyword-list
Values | Include | Exclude | Expect |
---|---|---|---|
AMU_CMD | FF | FFCD | |
FF_FMIT | VV | VVC | TRUE |
FFCD | |||
VV | TRUE | ||
LOL | |||
TCID_VVC | |||
RMI |