Forum Discussion

Bill_Ruggirello's avatar
Bill_Ruggirello
Copper Contributor
Sep 26, 2022

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?

  • Bill_Ruggirello 

    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.

Resources