Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
comments in line
"Alan Beban" wrote in message ... Tom Ogilvy wrote: if you want to put the values from arr2 into the array arr1 then Dim Arr1 As Range Dim Arr2() As Variant Arr2 = Worksheets("sheet2").Range("A1:A10").Value [ Arr2 = Worksheets("sheet2").Range("A1:A10").Value ] from original post Will this work in xl97? :-) OP's code, not mine - he maintains it is working, so it must not be xl97 (where it wouldn't work as you know). Set Arr1 = Worksheets("sheet1").Range("A1:J1") For i = 1 to 10 Arr1(i,1).Value = Arr2(1,i) next i Aren't the subscripts interchanged? Yep, should be Arr1(1,i).Value = Arr2(i,1) if to write the values form Arr2 to the range A1:A10 Set Arr1 = Worksheets("sheet1").Range("A1:J1") Worksheets("sheet2").Range("A1:A10").Value = Application.Transpose(Arr1) It is unclear exactly what you want to do, but perhaps the above will give you some ideas. Alan Beban -- Regards, Tom Ogilvy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Named ranges interfere with simple formulas | Excel Discussion (Misc queries) | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
vba - need simple function to delete ranges | Excel Programming | |||
simple question, hopefully a simple answer! | Excel Programming |