Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Is it possible for a function to return an array...and how? Any help would be appreciated. Thank you Jean-Pierre Bidon |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yep. You can have the array returned to that single cell or to a range of
cells. Option Explicit Function testme() As Variant Dim iCtr As Long Dim myArr(1 To 10) As String For iCtr = 1 To 10 myArr(iCtr) = "test" & iCtr Next iCtr testme = Application.Transpose(myArr) End Function Select A1:A10, type =testme() and hit ctrl-shift-enter. Jean-Pierre Bidon wrote: Hi, Is it possible for a function to return an array...and how? Any help would be appreciated. Thank you Jean-Pierre Bidon -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried your solution and it works.
Thank you Dave. Jean-Pierre "Dave Peterson" a écrit dans le message de news: ... Yep. You can have the array returned to that single cell or to a range of cells. Option Explicit Function testme() As Variant Dim iCtr As Long Dim myArr(1 To 10) As String For iCtr = 1 To 10 myArr(iCtr) = "test" & iCtr Next iCtr testme = Application.Transpose(myArr) End Function Select A1:A10, type =testme() and hit ctrl-shift-enter. Jean-Pierre Bidon wrote: Hi, Is it possible for a function to return an array...and how? Any help would be appreciated. Thank you Jean-Pierre Bidon -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
EXCEL: find string in vector & return cell reference | Excel Worksheet Functions | |||
How do I draw 3D vector arithmetic, showing vector subtraction? | Excel Discussion (Misc queries) | |||
from table to vector | Excel Worksheet Functions | |||
Vector lookup function | Excel Worksheet Functions | |||
Vector lookup function | Excel Worksheet Functions |