eliminate #VALUE!

Copper Contributor

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?

2 Replies

@Bill_Ruggirello 

 

=IFERROR(FIND("XYZ",C1), "")

@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.