Results 1 to 1 of 1

Populate 2D-array with non-contiguous range

Threaded View

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    Odense, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    1

    Lightbulb Populate 2D-array with non-contiguous range

    I am working on the following code, but instead of populating the 2D-array with a contiguous range (b1:d2), i need to populate it with a non-contiguous range("b1:d1,b4:d4").

    b1:d1 contains the city names and b4:d4 the indicator scores for each of the cities, so the overall array should look something like this: http://billedeupload.dk/images/xeqs3.png

    Sub range2array()
    ' two dimensions
    declare abc as variant
    Dim abc As Variant
    ' Store a range in array
    abc = Range("b1:d2")
    End Sub
    How do i loop through the non-contiguous range and get them stored like in the example table - city names and scores in a row each?

    Best regards Laksefar
    Last edited by Laksefar; 01-12-2013 at 07:10 AM. Reason: Unclear question

Thread Information

Users Browsing this Thread

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

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