Results 1 to 9 of 9

refer part of a multi dimension array

Threaded View

  1. #1
    Forum Contributor aprildu's Avatar
    Join Date
    04-13-2014
    Location
    Barrie,On, Canada
    MS-Off Ver
    Excel 2016
    Posts
    175

    refer part of a multi dimension array

    I have a 2 dimensional array: ar(1 to 2, 1 to 100). I need to refer to the first element of the first dimension ar(1, 1 to 100) without creating a new one. Is that possible? The reason I don't want to create a separate new array is because I need to use the value of the the second element of the first dimension ar(2, 1 to 100). For example something like:

    for i=1 to 100
         ar(1, i)=worksheets(i).name
         ar(2, i)=worksheets(i).index
    next
    Then I want to do something like:

    for x=1 to 100
       anotherAr(x)=application.worksheetfunction.large(ar(1,1 to 100),x )
    next
    But I don't think ar(1, 1 to 100) is recognized.

    To give a better explanation, for example, I need to create an array of the worksheet name sorted with their corresponding indexes based on the array of randomized sheet name and their indexes. I know this may not be the best description of my problem and I know there are other ways to achieve this specific goal but I am wondering if an array can be used so I can use it for other purposes. Many thanks in advance!
    Last edited by aprildu; 04-23-2017 at 05:23 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. add one dimension to array
    By shaykos in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-04-2015, 10:47 PM
  2. Does filling part of an array from a range re-dimension the array?
    By barryleajo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-04-2011, 10:09 AM
  3. Array dimension declaration
    By yellephant in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2007, 08:44 AM
  4. vlookup usage with dynamic & multi dimension arrays
    By pjjclark in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2007, 04:02 AM
  5. [SOLVED] Array dimension
    By Henrietta Klaus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2006, 11:10 AM
  6. [SOLVED] Mutli-dimensional Array to Single-Dimension Array
    By Blue Aardvark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2005, 05:05 AM
  7. Transferring part of a multi-dimensional array to a range in VBA
    By Bob J. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2005, 11:05 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