ODFF: CUMIPMT Summary: Calculates a cumulative interest payment. Syntax: CUMIPMT( Number rate ; Number periods ; Number value ; Integer start ; Integer end ; Integer type ) Returns: Currency Constraints: rate > 0; value > 0; 1 <= start <= end <= periods" =CUMIPMT(0,055/12;24;5000;4;6;-1) -> returns -57,80 , should return #error because type is 0 or 1 =CUMIPMT(0,055/12;24;5000;4;6;) -> returns -57,80 , should return #error because type is 0 or 1 and not optional parameter Checked in excel and excel return in both cases error.
Just a remark about "6;)" and "not optional parameter": these either consecutive ;; semicolons or, if at end, ;) semicolon followed by closing parenthesis, are not optional parameters, but omitted arguments. The difference is that they are given but as empty argument. Some functions (I don't recall off-hand which) may act differently if a parameter is specified as empty argument, or not specified at all.
Created attachment 126020 [details] extra use cases for CUMIPMT unit test Attachments shows the use cases I tested with the fixed code.
*** This bug has been marked as a duplicate of bug 100646 ***