| Summary: | The SEARCH function is not working since after version 5.3.7.2 | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Cubic Consult <cubicconsultng> |
| Component: | Calc | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | RESOLVED NOTABUG | ||
| Severity: | normal | CC: | miguelangelrv |
| Priority: | medium | ||
| Version: | 7.3.1.3 release | ||
| Hardware: | x86-64 (AMD64) | ||
| OS: | Windows (All) | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
I guess, your formula separator, it's the comma. You have a zero after quotes at the end of the formula, before the last parenthesis. Deleting it, the formula don't result in error. (In reply to m.a.riosv from comment #1) > You have a zero after quotes at the end of the formula, before the last > parenthesis. Deleting it, the formula don't result in error. Exactly. SEARCH function [1] takes optional third "Position" argument; and that argument, as *all* string positions in Calc, counts from 1, not 0. It is obvious from the example given there, which, although not showing the third argument itself, has the return result - and since the return from SEARCH is also position in string, 1-based count is shown: > =SEARCH(54;998877665544) returns 10. [1] https://help.libreoffice.org/latest/en-US/text/scalc/01/04060110.html?DbPAR=CALC#bm_id3151005 Function [1] has syntax error. You have that 'zero' without the separator after last quotes. Please attach a sample file Confirmed. Though it work in version 5. (In reply to m.a.riosv from comment #1) > I guess, your formula separator, it's the comma. > > You have a zero after quotes at the end of the formula, before the last > parenthesis. Deleting it, the formula don't result in error. You are right about the last 0 parameter being the cause. 1 should have been used. Thanks. NB: The comma works fine. (In reply to Cubic Consult from comment #4) > Though it work in version 5. Sure: since commit 07157107a3b7fd3d1b55db9ce1aeb9f6d4e204ab Author Winfried Donkers <winfrieddonkers@libreoffice.org> Sate Wed Feb 08 16:48:58 2017 +0100 tdf#105772 apply all ODFF constraints with function SEARCH. |
Description: The results of the SEARCH seems has not been okay since after version 5.3.7.2. It returns an error result even when the item searched for is in the search string. Steps to Reproduce: 1. =SEARCH("1","000000000000000000000000000000000000000000000000000200300000000000000000400500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",0) 2. 3. Actual Results: The above equation fails with an error Expected Results: Returned the index of the 1 Reproducible: Always User Profile Reset: Yes OpenGL enabled: Yes Additional Info: Version: 7.3.1.3 (x86) / LibreOffice Community Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951 CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win Locale: en-GB (en_GB); UI: en-GB Calc: CL