Issue 105036 - search() function yields #value! if search fails
Summary: search() function yields #value! if search fails
Status: CLOSED DUPLICATE of issue 66590
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOO310m19
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2009-09-13 09:48 UTC by oopla
Modified: 2009-09-13 16:42 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description oopla 2009-09-13 09:48:11 UTC
using the eg in guide [IT RICERCA = SEARCH]:

  RICERCA(54; 998877665544)

yields 10; but then

  RICERCA(54; 998877665584)

yields #VALORE! [ie #VALUE!) which is clearly wrong; the return value should be
eg 0 or -1, not an argument error. This breaks functions like

  IF(SEACH(123;456);"found";"x")

which neads to be rewritten in a clumsy form like eg

  IF(VAL.ERROR(SEACH(123;456));"x";"found")

which anyway prevents direct use of the SEARCH return value in eg a formula.
Comment 1 Regina Henschel 2009-09-13 16:42:30 UTC
Same problem with function FIND. But it cannot be solved easily, because the
behavior is defined in the standard ODF 1.2.

The problem is already tracked in issue 66590.

*** This issue has been marked as a duplicate of 66590 ***
Comment 2 Regina Henschel 2009-09-13 16:42:58 UTC
closing duplicate