Find returns #value! if search string not found. How to get around that?

I feel pity that the system which should be easy to use for ordinary people, is becoming more and more complex, because the developers want absolutely perfect behavior. Of course “find” should return 0 if it does not find the word, working in this case with “iferror” functions makes working much more difficult. Simple problems should be solved by simple solutions. We are living with AI development time and still we do not have good tools for ordinary people to make software applications.

1 Like

It is quite annoying (disgraceful, actually), that I have to google this work around every time I come across this issue only because some programmer decided to be an utter purist.

A string not found, as someone mentioned, isn’t necessarily an exception, and having written code in a number of languages for over 40 years, I can’t remember any language with string-handling functionality behaving this way - as far as I recall, a “string not found” condition would always return either 0 or -1, but never raise an exception. Not finding a string is nowhere near the category of dividing by zero.

The only reason I can think of for subjecting users to something as non-intuitive as this is sheer cruelty.

I recognize that it’s impossible to change things now without breaking thousands of spreadsheets out there, but an alternate find function that behave like that in <gasp!> Excel would go a long way in improving the experience of every user who does more than use calc to add up lists of numbers or design restaurant menus.

  • If the value of find_text is not found, the #VALUE! error value is returned.
1 Like

User-Defined Functions