Hello
I currently have an one-dimensional array (distinctCusts) filled with strings. I am printing the values of the array onto a worksheet by looping through a "for" loop as follows:
My problem is that the array is quite large, so looping takes an undesirable amount of time. I would like to do this without looping by setting the range equal to the array - something like:
I have had no success with this. Is there another way?
Thanks for your help!
I currently have an one-dimensional array (distinctCusts) filled with strings. I am printing the values of the array onto a worksheet by looping through a "for" loop as follows:
Code:
With Range("X6")
For iCust = 1 To nDistinctCusts
.Offset(iCust, 0) = distinctCusts(iCust)
Next
End With
My problem is that the array is quite large, so looping takes an undesirable amount of time. I would like to do this without looping by setting the range equal to the array - something like:
Code:
With Range("X6")
Range(.Offset(1,0), .Offset(nDistinctCusts,0)).Value = distinctCusts
End With
I have had no success with this. Is there another way?
Thanks for your help!