Apache OpenOffice (AOO) Bugzilla – Issue 108413
ODFF: SUBTOTAL with function indexes 101..111
Last modified: 2013-08-07 15:13:10 UTC
The Excel documentation/specs say that the first argument, the function index, needs to be >=1 and <=11. But what Excel does when the value is >=100 is to index=index%100 the function index. As example the formula "=SUBTOTAL(106,22);" produces in Excel the result 22. In Calc the result is an error. In KSpread we fixed the formula to also return 22.
Actually the function indexes 101..111 are not identical to 1..11. Excel excludes also manually hidden rows for 101..111, which it does not for 1..11. This will also be specified in the upcoming ODF OpenFormula standard, see http://tools.oasis-open.org/issues/browse/OFFICE-2030
Thanks Eike. We fixed it in KSpread. What we do now is; if(index>100) { index=index%100; selectedRange = excludeHiddenRows(selectedRange); }
I close this one, because issue 35718 has got votes. *** This issue has been marked as a duplicate of 35718 ***
closing, duplicate