Issue 90675

Summary: Calc: find and search functions return error on no-find.
Product: Calc Reporter: adrianh_hope <adrianh>
Component: programmingAssignee: spreadsheet <spreadsheet>
Status: CLOSED DUPLICATE QA Contact: issues@sc <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 2.4.1   
Target Milestone: ---   
Hardware: Mac   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description adrianh_hope 2008-06-12 21:07:43 UTC
On a failed search, both functions return #VALUE!.
To reproduce:
1. Enter in cell a formula with find text that will not be found in source
text, for example:

=FIND("ZZ";"source_text")

2. Observed:
 #VALUE! is returned.

3.Expected:
Return value of zero or negative 1 (0 or -1).

4. Discussion:
Cumbersome work-around example:

=IF(ISERR(FIND("find_text";C2));0;FIND("find_text";C2))

Documentation does not address the return value for the no-find
condition.

Yes, this is how Microsoft Excel does it. It is a bug in Excel also,
but I can't help them. ;-).

Maybe we could have our own function, like AT(find,source) that returns zero on
no-find.

Thanks...
Comment 1 discoleo 2008-06-13 21:58:42 UTC
This is probably a duplicate of issue 66590
http://www.openoffice.org/issues/show_bug.cgi?id=66590

Definitely should NOT be closed as WORKSFORME (as many other doubles were closed).
Comment 2 jm38706415 2008-08-18 03:33:13 UTC
Hi adrianh_hope,

This issue has been submitted in #66590 by Discoleo .

Thanks all the same.
Comment 3 redflagzhulihua 2008-08-22 10:44:33 UTC
Duplicate of issue 66590

*** This issue has been marked as a duplicate of 66590 ***
Comment 4 redflagzhulihua 2008-08-22 10:45:13 UTC
closed