Bug 101875 - EDITING: FIND and SEARCH functions don't use an array as first parameter in array formula
Summary: EDITING: FIND and SEARCH functions don't use an array as first parameter in a...
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-03 11:47 UTC by m_a_riosv
Modified: 2016-09-26 22:35 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
File showing the bug (13.66 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-09-03 11:47 UTC, m_a_riosv
Details
sample with countif (12.56 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-09-26 22:35 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m_a_riosv 2016-09-03 11:47:21 UTC
Created attachment 127134 [details]
File showing the bug

With a formula like

=SUMPRODUCT(NOT(ISERROR(FIND(E2:E3;A2:C11))))

FIND doesn't find for values in E2:E3, looks if it finds some of them.
Comment 1 Buovjaga 2016-09-24 16:41:00 UTC
Eike, Winfried: what do you think about this?
Comment 2 Winfried Donkers 2016-09-26 08:49:18 UTC
(In reply to Buovjaga from comment #1)
> Eike, Winfried: what do you think about this?

My 2 cents: FIND, SEARCH and EXACT look like good working functions, compliant with ODFF1.2 and using texts as arguments 1 and 2. 
If ranges are given for arguments 1 and 2 and the function is entered as an array function, the functions return the values for the array - provided that the ranges of argument 1 and 2 have the same size (rows, columns). 
It doesn't look like a bug to me, more like unsupported use. I wouldn't know what FIND is supposed to do with the arguments in FIND(E2:E3;A2:C11).
Comment 3 Eike Rathke 2016-09-26 10:03:38 UTC
There's nothing wrong. In array mode, for FIND(E2:E3;A2:C11) the E2:E3 creates a column vector of 2 elements and A2:C11 a matrix of 3x8. The column vector is repeatedly used for each column of the 3x8 matrix, hence for the second column results are 5 and 1 and no result for column one and three. The column vector has only two elements, so for all columns starting at row 3 of the matrix there's no result.
Comment 4 m_a_riosv 2016-09-26 22:35:57 UTC
Created attachment 127652 [details]
sample with countif

(In reply to Winfried Donkers from comment #2)

> It doesn't look like a bug to me, more like unsupported use.
Looks like, FIND has my expected result with only one of the arguments as array. 

> I wouldn't know
> what FIND is supposed to do with the arguments in FIND(E2:E3;A2:C11).
Count cells that contain E2 or E3.

With the same ranges as argument =SUMPRODUCT(COUNTIF(A2:C11;".*"&E2:E3&".*"))
works fine, although needs regular expressions. I guess because the first argument in COUNTIF is treated in a different way with array expressions.