Consulting

Results 1 to 2 of 2

Thread: Solved: moving array to worksheet

  1. #1

    Solved: moving array to worksheet

    I have an array that is not uniform size that I need to copy to the worksheet. I want to copy it over at once as a range for speed sake.

    I'm using cells(1,1).resize(imaxrow,imaxcol).value=myarray
    this command leaves the data starting in b2 and it cuts off the last row and column

    the latter problem is easy as i just change the resize to (imaxrow+1,imaxcol+1)
    but I just can't figure out how to get the array to start in A1.

    if i do cells(1,1)=myarray(1,1) it works so if necessary I can use loops and import my array one cell at a time but that will just make it slower so I don't want to resort to that.

  2. #2
    i figured it out.... i had done
    redim myarray(imaxrow,imaxcol)

    what i needed to do is
    redim myarray(1 to imaxrow, 1 to imaxcol)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •