Hi,
I know a few ways to accomplish the task but I'm curious to know if there is a syntax which will "Do it My Way".
The following code will fill Arr1 cells with 10 values from range A1:A10 and then fill F1:F10 with those values.
Sub FODA()
Dim Rng As Range
Arr1 = Range("A1:A10")
Set Rng = Range("F1:F10")
Rng = Arr1
End Sub
Now, assume 2 ranges (A1:A10 and B1:B10)
Putting each range into an Array is easy - as shown in the 2 first commands of the following code.
I want to add cell 1 of Arr1 with cell 1 of Arr2 and put the result in cell 1 of Arr3
I have tried:
Sub FODA2()
Dim Rng As Range
Arr1 = Range("A1:A10")
Arr2 = Range("B1:B10")
Arr3 = Arr1 + Arr2 ' Returns "Type Mismatch" error
Set Rng = Range("F1:F10")
Rng = Arr3
End Sub
Is there a way to fill Arr3 with Arr1 & Arr2 cells sum with a single command (WITHOUT LOOPING) ?.
'Join' and 'Split' don't seem to do any good.
Thanks, Elm
Bookmarks