Arrays/Inline arrays computed differently when expected. Steps to reproduce: 1. Enter 400638133393 into A1 2. Enter =SUM(MID(A1;{1;2;3;4;5;6;7;8;9;10;11;12};1)*{1;3;1;3;1;3;1;3;1;3;1;3}) Current behavior: Result = 96 Expected behavior: Result = 89 (Excel gives correct result) Operating System: Windows 7 Version: 4.1.3.2 rc
Created attachment 88520 [details] File sample with differents formulas. Hi Paul, thanks for reporting. It is reproducible with: Win7x64 Ultimate Version: 3.5.7.2 Version: 4.0.6.2 Version: 4.1.4.0.0+Build ID: d6ee64b75581cbeb92534271ee6f4e87f07aa5c AOO 4.0.1 MID() always return the first value "4", this is why result in 96. Seems that MID() doesn't accept an inner array without an explicit array formula. The follow formula get 89 as result: {=SUM(VALUE(MID(A1;{1;2;3;4;5;6;7;8;9;10;11;12};1))*{1;3;1;3;1;3;1;3;1;3;1;3})} entered as array Ctrl+Shift+Enter. or =SUMPRODUCT(VALUE(MID(A1;{1;2;3;4;5;6;7;8;9;10;11;12};1));{1;3;1;3;1;3;1;3;1;3;1;3}) but is needed to use VALUE() function transforming the string returned by MID() in a number. So I can confirm the behaviour but I don't know if it is really a bug.
@Markus - can we get your thoughts on this bug, either NEW or NOTABUG?
Not a bug. Functions taking a scalar argument as parameter have to be used in a matrix/array context to be evaluated for all elements of an array parameter. SUMPRODUCT is special in that it automatically forces all of its inner parameters into array context, SUM does not do that.