Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to declare an array from within a function, and then add to that
array certain fields from a range I use as the input variable. For example: Function test(rng As Range) valuesArr = rng ReDim testArray(20) As String For i = 1 To UBound(valuesArr) testArray(i) = valuesArr(i, 1) Next i test = testArray(5) End Function So I want to add all values from within "rng" to "testArray()", and then take the 5th element of testArray() and return it. I keep getting an error when I enter the function, any ideas? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Declare Variables in Array | Excel Discussion (Misc queries) | |||
How do I declare a function whose output is an array? | Excel Programming | |||
Global array declare | Excel Programming | |||
How to declare a dynamic array | Excel Discussion (Misc queries) | |||
Declare an Array() ???? | Excel Programming |