Hi Niklas,

Niklas Nebel wrote:
Leonard Mada wrote:
Exactly this is the problem. It returns an *ERROR*, so searching for "string 1" OR "string 2" will fail grandiosely. Actually, it is impossible to perform this search in calc. This is a *BUG*. (the full comments can be found for issue 66590)

It's possible using ISERROR. One day, for compatibility, we'll need an IFERROR-like function, which will also make such cases easier to handle.

"Easier to handle" sounds a little bit cynical. Here are the 2 search possibilities:

*method 1*
// DOES NOT WORK IN CALC OR EXEL
FIND("string 1", A1) OR FIND("string 2", A1)

*method 2*
using ISERR(): take a small break, a cup of coffee and enjoy:
[this actually works in Exel]
- we will need 7 additional columns (B-H) in addition to the data column (A)
- B: =FIND("string 1", A1)
- C: =FIND("string 2", A1)
- D: = ... here will be our final result
- E: =ISERR(B1)
- F: =ISERR(C1)
- G: =IF(E1=FALSE,B1,0)
- H: =IF(F1=FALSE,C1,0)
- and now lets return to column D, where the final result will be stored:
- D: = OR(G1, H1)

To my mind, method 2 is slightly more cumbersome than method 1, but that is just my personal belief. Though, I'll propose to vote which implementation is better; I fear however, the end polls will strongly favour method 1.

Kind regards,

Leonard Mada

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to