+ Reply to Thread
Results 1 to 4 of 4

Adding non contiguous rows of data to an array by means of areas

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Here
    MS-Off Ver
    Excel 2010
    Posts
    119

    Adding non contiguous rows of data to an array by means of areas

    Hello,

    I have a data set where users can select entire non contiguous in order to print the selected data on a special form, so I am trying to use 'areas' to join the non contiguous row selections into an array.

    I have the following code that works but I'm getting the feeling there must be a better way.
    Please Login or Register  to view this content.
    I'm using the first For loop to determine the total number of rows selected and thus the necessary size of the array, keeping in mind that each area may have contiguous rows within it.

    The second For loop is pretty much a repeat of the first For loop and adds the data of the selected rows to the array one cell at a time.

    There's got to be a better way!


    TV

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Adding non contiguous rows of data to an array by means of areas

    Hi TV,
    try this
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Here
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Adding non contiguous rows of data to an array by means of areas

    Nilem, thanks for you response. I also considered temporarily moving the data to another sheet, but I was looking for a solution that did not rely on that.

    TV

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Adding non contiguous rows of data to an array by means of areas

    then maybe so
    Please Login or Register  to view this content.

+ 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. Replies: 2
    Last Post: 11-04-2012, 12:18 AM
  2. [SOLVED] Count rows between two areas in a collection/selection of multiple areas
    By JTwrk in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-02-2012, 10:38 AM
  3. Copy and Paste an array (contiguous & non contiguous ranges)
    By Xrull in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-09-2010, 09:17 AM
  4. Can i print non-contiguous areas on one page??
    By yiota in forum Excel General
    Replies: 2
    Last Post: 03-27-2006, 09:55 AM
  5. [SOLVED] Can i print non-contiguous areas on one page
    By yiota in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-27-2006, 07: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