Goal: I want to search a column containing a moderate amount of text {Notes} for specific keywords and based on those keywords insert a text category (Example: “Pro-Trump” | “Anti-Trump” | “Pro-BLM”) into another column in a 46000 row spreadsheet.
Present formula I’m currently using:
IF(NOT(ISERROR(SEARCH("Martin Luther King",M2))),"Pro-MLK",
IF(NOT(ISERROR(SEARCH("pro-Biden",M2))),"Pro-Biden",
IF(NOT(ISERROR(SEARCH("anti-Biden",M2))),"Anti-Biden",
IF(NOT(ISERROR(SEARCH("Trump Supporters",M2))),"Pro-Trump",
IF(NOT(ISERROR(SEARCH("Trump Supporter",M2))),"Pro-Trump",
IF(NOT(ISERROR(SEARCH("anti-Trump",M2))),"Anti-Trump",
IF(NOT(ISERROR(SEARCH("People's Convoy",M2))),"Freedom Convoy",
IF(NOT(ISERROR(SEARCH("bomb threat",M2))),"Bomb Threat",
IF(NOT(ISERROR(SEARCH("bomb-making",M2))),"Bomb Making",
IF(NOT(ISERROR(SEARCH("Stop the Steal",M2))),"Pro-Legal Voting",
IF(NOT(ISERROR(SEARCH("support of President Trump",M2))),"Pro-Trump",
IF(NOT(ISERROR(SEARCH("support President Trump",M2))),"Pro-Trump",
IF(NOT(ISERROR(SEARCH("support * Trump",M2))),"Pro-Trump",
IF(NOT(ISERROR(SEARCH("support* President Trump",M2))),"Pro-Trump",
IF(NOT(ISERROR(SEARCH("support for President Trump",M2))),"Pro-Trump",
IF(NOT(ISERROR(SEARCH("support * former President Donald Trump",M2))),"Pro-Trump",
IF(NOT(ISERROR(SEARCH("Protect the Vote",M2))),"Pro-Legal Voting",
IF(NOT(ISERROR(SEARCH("anti-vaccine",M2))),"Anti-COVID Mandates",
IF(NOT(ISERROR(SEARCH("anti-mask",M2))),"Anti-COVID Mandates",
IF(NOT(ISERROR(SEARCH("mandate*",M2))),"Anti-COVID Mandates",
IF(NOT(ISERROR(SEARCH("protested President Biden",M2))),"Anti-Biden",
IF(NOT(ISERROR(SEARCH("support for gun rights",M2))),"Pro-2ND Amend",
IF(NOT(ISERROR(SEARCH("pro-Trump",M2))),"Pro-Trump",
IF(NOT(ISERROR(SEARCH("Black Lives Matter",M2))),"Pro-BLM",
IF(NOT(ISERROR(SEARCH("Black Lives Movement",M2))),"Pro-BLM",)))))))))))))))))))))))))
Question: Can the OR function be used with the SEARCH function in this formula to consolidate the formula throwing similar results such as “Pro-Trump” and “Pro-BLM”? I can’t seem to wrap my head around this. An example please if OR can be used. Thank you.