Bug 58585 - IRR / MIRR functions should accept an array argument
Summary: IRR / MIRR functions should accept an array argument
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: low enhancement
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.2.0
Keywords: needsDevEval
: 138262 (view as bug list)
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2012-12-20 20:04 UTC by Tim van Boxtel
Modified: 2021-12-12 14:17 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim van Boxtel 2012-12-20 20:04:52 UTC
Problem Description:
Both the IRR and MIRR functions take a range as an input argument.  They, do not, however, accept an array of values.  Instead a 504 Error is returned.


Suggested Functionality:

=IRR( { -10000, 5000, 5000, 5000 } )
OR
=IRR( {-2000, A1:A6, A7 + 100 } )
Comment 1 Joel Madero 2013-11-25 18:06:34 UTC
Quite a tricky request but I've verified that it's valid so here it goes :)

Thank you for reporting this enhancement request! I can confirm that this is a valid enhancement request on:
Version: 4.2.0.0.alpha0+Build ID: 09a4c4d176ff97ab8ff4027af83a549991667baf
Date:   Sat Nov 16 20:32:43 2013 +0100 
Platform: Ubuntu Linux 13.04 x64
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
As I've been able to confirm the enhancement request I am marking as:

New (confirmed)
Enhancement
Low - from the lack of input of any other user it seems like this isn't particularly important to people. But, maybe an easy hack so adding

Keywords - 

Whiteboard Status - ProposedEasyHack

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 2 Joel Madero 2014-02-27 22:55:27 UTC
In order to limit the confusion between ProposedEasyHack and EasyHack and to make queries much easier we are changing ProposedEasyHack to NeedsDevEval.

Thank you and apologies for the noise
Comment 3 Robinson Tryon (qubit) 2015-12-13 11:21:04 UTC Comment hidden (obsolete)
Comment 4 raal 2016-07-18 18:44:02 UTC
MIRR fixed in bug 100767
Comment 5 Eike Rathke 2021-04-12 14:19:02 UTC
Fwiw, that
  =IRR( {-2000, A1:A6, A7 + 100 } )
can not work because inline arrays can only contain numeric or text type values, but not references or expressions. However, this
  =IRR( { -10000, 5000, 5000, 5000 } )
should be made work.
Comment 6 Andreas Heinisch 2021-04-12 20:03:07 UTC
Here is a first attempt in order to fix this issue: https://gerrit.libreoffice.org/c/core/+/113971
Comment 7 Commit Notification 2021-04-21 15:00:20 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a8216c210dbe83a7fe0c8b1a767c2ddf8b611e96

tdf#58585 - IRR function: support array argument for values

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Buovjaga 2021-07-27 17:08:34 UTC
*** Bug 138262 has been marked as a duplicate of this bug. ***
Comment 9 Stéphane Guillou (stragu) 2021-12-12 14:17:42 UTC
Verified as fixed in:

Version: 7.2.4.1 / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Added to the 7.2 release notes: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F7.2&type=revision&diff=424923&oldid=423820

I assume that the documentation should now say "an array or a cell range" instead of just "an array"? https://help.libreoffice.org/7.2/en-US/text/scalc/01/04060103.html?&DbPAR=WRITER&System=UNIX#bm_id3153948