+ Reply to Thread
Results 1 to 8 of 8

Array within Array within Array, Possible?

  1. #1
    Forum Contributor
    Join Date
    09-13-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    111

    Array within Array within Array, Possible?

    Hey All,

    I'm getting stumped on a concept, and was wondering if this is possible. Can I have an array with the following dimensions?

    ArrayGroups ( 1 to k)
    ArraySubGroups (1 to j)
    ArrayPointsinSubGroups (1 to 3)

    where array SubGroups is comprised of mini arrays of ArrayPointsinSubGroups
    and ArrayGroups is comprised of the SubGroup Array?

    This might make it easier to understand:
    ArrayGroups( 1k(ArSubGroups1(ArPointsinSubGroup1,ArPointsinSubGroup2,ArPointsinSubGroup3) _,ArSubGroups2(ArPointsinSubGroups1,ArPointsinSubGroup2,ArPointsinSubGroup3) _
    ,ArsubGroups3(ArPointsinSubGroups1,ArPointsinSubGroup2,ArPointsinSubGroup3)))

    It's almost like a dream within a dream within a dream...I can't believe I get to use my "Inception" quote.

    I basically have a lot of data to analyze and the hard part about it is that there can be a lot of different types of data. Sorry, due to my confidentiality agreement, I can't get any more specific.

    Thanks,
    Bob1980

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Array within Array within Array, Possible?

    yes it's possible-if your arrays are declared as variants you can store anything in them. it seems likely that a setup using classes and collections will be better but that's your call
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Array within Array within Array, Possible?

    Jay,
    I thought there is another name by Josephp, it is only when I saw your signature I realise that it the same person. I am losing tacking your photo collection.

  4. #4
    Forum Contributor
    Join Date
    09-13-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    111

    Re: Array within Array within Array, Possible?

    Hi JosephP,

    Thanks for the nudge. I went ahead and built 3 Collections, and below is the code. What I did was that I build 3 separate collections for 3 types of colors.

    These are the arrays that are compiled before the compiling of the collections:
    xx ()
    Part1()
    Part2()
    *Note: I changed the names of the Part1() and Part2() due to confidentiality, the actual array names are different.

    What the challenge for me now is that I don't know what colors will be in a set of data; but what I do know is all of the possible colors that may be in the data. My initial thought was to use the Part1() to call or hash/loop through all of the collections, thinking this would print only the collections that are filled. But, the items in the Part1() are strings and VBA won’t allow me to compare the Part1()items to the name of the collection. Can you offer a nudge that will allow me to dynamically choose which collections to fill; or a way to prompt specific collections to print based upon the colors detected?

    Please Login or Register  to view this content.
    Thanks for the help.
    Bob1980

  5. #5
    Forum Contributor
    Join Date
    09-13-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    111

    Re: Array within Array within Array, Possible?

    JosephP,

    I think I can create a collection out of these collections, and name the key a "string". With that being said, I might have this down...hopefully. lol. I'll look into this, but still wouldn't mind your feedback, or anyone else for that matter.

    Thanks,
    Bob1980

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Array within Array within Array, Possible?

    I think you need to explain clearly what your data is and what you're trying to do with it.
    Last edited by shg; 07-24-2013 at 02:26 PM.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Contributor
    Join Date
    09-13-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    111

    Re: Array within Array within Array, Possible?

    Hi shg,

    Sorry, I don't feel comfortable doing that, but what I can tell you is that I've successfully merged my collections within a larger collection. And I'm trying to figure out how to print from the larger collection, rather then building a whole bunch of if statements.

    ThanksBob

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Array within Array within Array, Possible?

    OK, good luck.

+ 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. Loop new messages containing a table, populate a dynamic array, paste array to Excel
    By laripa in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2013, 07:20 AM
  2. [SOLVED] Quick Array question - Copy array to another array then resize?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-02-2013, 01:17 AM
  3. [SOLVED] Populate Listbox with all rows of a dynamic array where elements of a single array match.
    By Tayque_J_Holmes in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-07-2012, 04:54 AM
  4. Replace hard coded array in formula with link to input array
    By David Brown in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-08-2011, 07:45 AM
  5. select variables ranges, copy to array, paste the array in new workbook
    By Mathew in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-01-2005, 05:06 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