Forum Discussion
Search for text within a cell and returning value based on what is found or leave the cell blank
OR
=IFS(ISNUMBER(SEARCH("apple",C3)),"$1",ISNUMBER(SEARCH("orange",C3)),"$2",TRUE,"")
Thank you! How do I add to this formula logic to return a blank (or $0) if neither apple or orange are a word in cell C3? m_tarler
- m_tarlerOct 31, 2024Bronze ContributorThat formula already returns "" (blank) if neither is found. HOWEVER "" is NOT truly BLANK in the sense if you try using ISBLANK() it will return FALSE since that cell may look blank it has a formula in it and returns an empty string value.
- miked2525Nov 01, 2024Copper Contributor
Hi!
What did I do wrong here? I'm looking to return one of these values based on cell V3 containing one of these words OR return a " " (blank) if none of these words are present in cell V3. I'm getting a "
=IF(OR(ISNUMBER(SEARCH("apple",V3)),"$1","",ISNUMBER(SEARCH("orange",V3))),"$2","",(ISNUMBER(SEARCH("banana",V3)),"$3","",ISNUMBER(SEARCH("grape",V3))),"4","")
- miked2525Nov 01, 2024Copper Contributor
Hi!
What did I do wrong here? I'm looking to return one of these values based on cell V3 containing one of these words OR return a " " (blank) if none of these words are present in cell V3. I'm getting a "
=IF(OR(ISNUMBER(SEARCH("apple",V3)),"$1","",ISNUMBER(SEARCH("orange",V3))),"$2","",(ISNUMBER(SEARCH("banana",V3)),"$3","",ISNUMBER(SEARCH("grape",V3))),"4","")