Forum Discussion
Bill_Ruggirello
Sep 26, 2022Copper Contributor
eliminate #VALUE!
I am using Find("XYZ",C1). It works fine if XYZ is in the cell. If it is not I get #VALUE! How can I make it blank if XYZ is not in the cell?
PeterBartholomew1
Sep 26, 2022Silver Contributor
As a 365 user, a more verbose programming style can fit better into my workbook, for example
= LET(
position, FIND("xyz", Cell),
valid?, ISNUMBER(position),
IF(valid?, LEFT(Cell,position-1), "Not found")
)
would return the values to the left of the search string in the cell.