I'm trying to search for specific words in a cell and assign a code if any of the words are present. I want to search the cell only up to a certain point. Here's an example of one of the text strings I'm searching:
We Removed $6000 from our retirement account for a home purchase. Can we enter this amount into the state return category where it asks "Benefits not eligible for deduction" ***************************************************************** Source: Answer
Center (OL) FAQs Viewed: 8863 - Education Credits (930) American Opportunity
Credit First Four Years (949) Educator Expense Deduction - Teacher (1126)
I want to search for specific words and return the number 112 if any of those words exist. Right now, I have the formula:
=IF(ISNUMBER(SEARCH("Retire",$N2)),112,IF(ISNUMBER(SEARCH("1099",$N2)),112,IF(ISNUMBER(SEARCH("IRA",$N2)),112,IF(ISNUMBER(SEARCH("distribution",$N2)),112,IF(ISNUMBER(SEARCH("annuity",$N2)),112,IF(ISNUMBER(SEARCH("profit*sharing",$N2)),112,""))))))
It works, but I want to stop searching the text at the words "Source:Answer".
Could someone help me adjust my formula to stop the search mid string (and maybe consolidate what I have now)?
Thanks!
We Removed $6000 from our retirement account for a home purchase. Can we enter this amount into the state return category where it asks "Benefits not eligible for deduction" ***************************************************************** Source: Answer
Center (OL) FAQs Viewed: 8863 - Education Credits (930) American Opportunity
Credit First Four Years (949) Educator Expense Deduction - Teacher (1126)
I want to search for specific words and return the number 112 if any of those words exist. Right now, I have the formula:
=IF(ISNUMBER(SEARCH("Retire",$N2)),112,IF(ISNUMBER(SEARCH("1099",$N2)),112,IF(ISNUMBER(SEARCH("IRA",$N2)),112,IF(ISNUMBER(SEARCH("distribution",$N2)),112,IF(ISNUMBER(SEARCH("annuity",$N2)),112,IF(ISNUMBER(SEARCH("profit*sharing",$N2)),112,""))))))
It works, but I want to stop searching the text at the words "Source:Answer".
Could someone help me adjust my formula to stop the search mid string (and maybe consolidate what I have now)?
Thanks!