Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unexpected result copying an array
Roedd <<Schizoid Man wedi ysgrifennu:
Hi, I have a single column of numbers from 1 to 10. I've written the following function to replicate these numbers in another column using the matrix enter (Ctrl-Shift-Enter). Your output array needs to be two dimensional: Public Function copyArr(wk As Range) As Integer() Dim outArr() As Integer Dim i As Integer i = wk.Rows.Count Dim c As Integer ReDim outArr(1 To i, 1 To 1) As Integer For c = 1 To i outArr(c, 1) = wk(c) Next c copyArr = outArr End Function HTH Rob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unexpected Result | Excel Worksheet Functions | |||
FV Function result is unexpected. | Excel Worksheet Functions | |||
unexpected result from inputbox | Excel Programming | |||
Unexpected result | Excel Worksheet Functions | |||
FileSearch gives unexpected result | Excel Programming |