Description: I have the following Basic function: Function test(a as double, b as double, c as double, d as double) as variant test = Array(a*20,b*2,c*2,d*2) end Function If I enter in cells B1: 1, B2: 2, B3: 3, B4: 4 and in Cells C1:C4 the function =TEST(B4,B5,B6,B7) as array function ({=TEST(B4,B5,B6,B7}) only the first value, i.e. 20 is displayed in Cells C1, C2, C3 and C4. Correct behaviour would be: C1: 20, C2: 4, C3: 6, C4: 8. The preview in the function wizard is correct and shows in the field Result: {20,4,6,8}. Steps to Reproduce: 1. Write the basic function in the libre office basic editor (Module 1): Function test(a as double, b as double, c as double, d as double) as variant test = Array(a*20,b*2,c*2,d*2) end Function 2. Fill in the numbers 1, 2, 3 , 4 in cells B1, B2, B3, and B4 3. Enter the function =TEST(B4,B5,B6,B7) as array function ({=TEST(B4,B5,B6,B7}) in Cells C1:C4. 4. 20 is displayed in Cells C1, C2, C3 and C4. 5. Correct Behaviour would be: C1: 20, C2: 4, C3: 6, C4: 8 6. The preview in the function wizard is correct and shows in the field Result: {20,4,6,8}. Actual Results: see above Expected Results: see above Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
I don't understand your array function syntax. Am I supposed to enter it like you say ({=TEST(B4,B5,B6,B7})? If I do it like that, it just treats it as text. If I enter it as {=TEST(B4,B5,B6,B7} it gives 80 for C1 and 0 for the others. Arch Linux 64-bit, KDE Plasma 5 Version: 6.0.0.0.alpha0+ Build ID: 507247697dc6c4a41fe17a29d522511f97040738 CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde4; Locale: fi-FI (fi_FI.UTF-8); Calc: group Built on August 29th 2017
By entering the array function TEST(B4,B5,B6,B7) if refer to the following process: - Mark cells C1:C4 - fill in: =TEST(B4,B5,B6,B7) - press shift+ctrl+enter simultaneously - you see in all 4 cells c1 to c4 {=TEST(B4,B5,B6,B7)} in the input line - the spreadsheet displays in c1, c2, c3 and c4 20 instead of c1: 20, c2: 4 c3: 6, c4: 8
Your basic formula returns an online array, not column. Enter =TEST(B4,B5,B6,B7) in C1 (only C1 selected) and valid with Ctrl+Shift+Enter and you get expected result in C1:F1.
(In reply to GerardF from comment #3) > Your basic formula returns an online array, not column. > Enter =TEST(B4,B5,B6,B7) in C1 (only C1 selected) and valid with > Ctrl+Shift+Enter and you get expected result in C1:F1. Well it seems we can close as NOTABUG..
Thanks, sorry for bothering