Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How to create worksheet function that return a array into
cells ? This function return only 100 into cells (i put cell as single or as a arry function (with ctrl+shift+enter) Function test() As Variant Dim a(2) As Byte a(0) = 100 a(1) = 50 test = a End Function |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It works for me.
Select C4:E4, go to the formula bar and enter =Test() then exit with Ctrl+Shift+Enter The 3 cells must be in a single row. If displays 100 50 0 note that A(2) produces a 3 element array, same as Dim A(0 to 2) -- Regards, Tom Ogilvy "Yuriy Kuznetsov" wrote in message ... How to create worksheet function that return a array into cells ? This function return only 100 into cells (i put cell as single or as a arry function (with ctrl+shift+enter) Function test() As Variant Dim a(2) As Byte a(0) = 100 a(1) = 50 test = a End Function |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
10x Tom:)
My mistake... I my situation I put in column not into row:( Into column situation right usage is {=TRANSPOSE(test())} Thanks again Tom Ogilvy wrote: It works for me. Select C4:E4, go to the formula bar and enter =Test() then exit with Ctrl+Shift+Enter The 3 cells must be in a single row. If displays 100 50 0 note that A(2) produces a 3 element array, same as Dim A(0 to 2) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet Function to Create Array of Size n with values x Through | Excel Discussion (Misc queries) | |||
how do I create an array | Excel Discussion (Misc queries) | |||
how do I create an array | Excel Discussion (Misc queries) | |||
Create Pivot from array? | Excel Programming | |||
Create a PivotTable from a VBA array? | Excel Programming |