+ Reply to Thread
Results 1 to 7 of 7

Error in printing 1D Array

  1. #1
    Forum Contributor
    Join Date
    10-22-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    114

    Error in printing 1D Array

    Hi all,

    I have range of data Range("A1:Z10000"). I want to consolidate it into a single column.
    The array looks ok, but I have trouble printing it out. Only the first element of the array got printed.
    Any help, comments or guidance are greatly appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Error in printing 1D Array

    See how I did it in: http://www.excelforum.com/excel-prog...o-another.html

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Error in printing 1D Array

    I think you'd need to use Transpose to get the array out but, as I recall, there is a limitation on the number of cells that you can transpose.

    Please Login or Register  to view this content.

    The code above works with 26 columns and 2520 rows. After that, you get an error ... hence the error handling.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Error in printing 1D Array

    If your objective is to combine into a single column, why not just copy pasta?

    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  5. #5
    Forum Contributor
    Join Date
    10-22-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Error in printing 1D Array

    Thank you all for your input. I just thought of something but not sure if it's even possible. Since there are a total of 260,000 elements in the array, and the Transpose function only allows 70,000 elements to be printed.
    If I take 260,000 / 4 = 65,000 then is it possible to print 65,000 elements at a time?
    I want to stick with the variant array because of its speed.

    I cant get the syntax right for the last 4 lines of code ( the printing part )

    Please Login or Register  to view this content.

  6. #6
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Error in printing 1D Array

    I don't see the issue.

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    10-22-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Error in printing 1D Array

    Sorry, I reduced the size of the dataset. It doesn't work with the full size of the dataset. I was hoping if could write the array out in 4 increments to overcome the Transpose limitation.

    Something like:
    nuArr( 1 to 65000)
    nuArr(65000 to 130000)
    nuArr(130000 to 195000)
    nuArr(195000 to 260000)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Printing an array to another sheet.
    By AndrewMac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2013, 10:12 AM
  2. Printing a 2 dimensional array
    By parasbshah in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-09-2011, 10:45 PM
  3. Excel 2007 : How to attain ARRAY PRINTING
    By APPLEBEE in forum Excel General
    Replies: 2
    Last Post: 05-17-2011, 01:12 PM
  4. Array problem: Key words-Variant Array, single-element, type mismatch error
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-09-2005, 01:54 AM
  5. Array problem: Key words-Variant Array, single-element, type mismatch error
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2005, 12:30 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1