Bug 72197 - Add EXcel 2010 functions MODE.SNGL, MODE.MULT, NEGBINOM.DIST, Z.TEST
Summary: Add EXcel 2010 functions MODE.SNGL, MODE.MULT, NEGBINOM.DIST, Z.TEST
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Winfried Donkers
URL:
Whiteboard: target:4.3.0
Keywords:
Depends on:
Blocks: 70798
  Show dependency treegraph
 
Reported: 2013-12-01 15:21 UTC by Winfried Donkers
Modified: 2016-12-09 16:11 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
calc document with results of MODE.MULT (14.29 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-01-23 16:05 UTC, Winfried Donkers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Winfried Donkers 2013-12-01 15:21:09 UTC
see meta bug 70798 for details
Comment 1 Winfried Donkers 2014-01-23 16:05:57 UTC
Created attachment 92679 [details]
calc document with results of MODE.MULT

Attached document shows a (possible) problem when implementing MODE.MULT.
Used code is in https://gerrit.libreoffice.org/#/c/7615/ . I misused the MODE function by replacing its code with that of MODE.MULT, just to test behaviour.

When modifying the dataset in such a way that length of the resulting array of MODE.MULT (which is an array) changes, produces incorrect cell values.

When the result array decreases, one or more values are duplicated or replaced by N/A.
When the result increases, the extra values do not show.

BTW, I can't put the function directly in the cell, I must use the function wizard to get an array as result. Inputting {=MODE(A1:C3)} is not recognized as a function, let alone an array function. :/
Comment 2 Eike Rathke 2014-01-30 14:06:53 UTC
A calculated result never changes cells it is not assigned to, if the original array formula was entered in F1:F4 you will not get a value in F5 if the result vector is of length 5. If the result vector is shorter than the original array formula you get #N/A in the exceeding cells. Works like designed ;-)

Duplicated cells may happen if the result vector has only one element, that then is replicated for remaining cells of the array formula. This is also the case if there is only one column and the array formula consists of several columns, the entire column is replicated for the remaining columns. Same for rows.

To enter a matrix/array formula simply close the formula cell with Shift+Ctrl+Enter instead of just Enter.
Comment 3 Commit Notification 2014-03-05 11:54:32 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e4def6edaa4686e50bbfd4490a4b9ddb928397a4

fdo#72197 Add Excel 2010 functions



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.