sandbagger
03-15-2009, 05:44 PM
i have a function that returns a 2-d array of varying size. could be 300x6, 400x4 etc. i simply want to dump that array into the spreadsheet starting at "A1".
for instance,
if my array is a 4x5 array i need:
Range(A1:E4) = someArray
if my array is a 27x10 array i need:
Range(A1:AA10) = someArray
do i have to write some function that takes the dimensions of the array and calculates that the end of the range? like:
27 columns and 10 rows => AA10
if i make the range bigger than the array i get "#N/A" in all the extra cells. there has got to be a better way to do this.
for instance,
if my array is a 4x5 array i need:
Range(A1:E4) = someArray
if my array is a 27x10 array i need:
Range(A1:AA10) = someArray
do i have to write some function that takes the dimensions of the array and calculates that the end of the range? like:
27 columns and 10 rows => AA10
if i make the range bigger than the array i get "#N/A" in all the extra cells. there has got to be a better way to do this.