+ Reply to Thread
Results 1 to 6 of 6

Set up a multi-dimensional array

  1. #1
    Forum Contributor
    Join Date
    03-27-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    290

    Set up a multi-dimensional array

    Hello,

    I have two array like so:

    PrevCar = Array("Mercades","Ford","Vauxell","Nissan")
    ColorCar = Array("Silver","Red","Blue","Black")

    and i want to make a new array with these two connected together matching PrevCar with ColorCar so I can type something like....

    Car(1,2) to get "Ford", "Blue" as an example

    i want to use this so I can say:

    If x appears in the list, change column width to y

    without having an if statement for every column or having a different letter assigned to it.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Set up a multi-dimensional array

    In a multidimensional array Car(1,2) would return only one item, not two.
    If posting code please use code tags, see here.

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Set up a multi-dimensional array

    Can you give an example of how you would want to use it in code, I'm struggling to understand exactly what you're trying to do

  4. #4
    Forum Contributor
    Join Date
    03-27-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Set up a multi-dimensional array

    I have a array of column headers which I want to see if they exist... If they do exist, change the column width to a number which is related directly to the column header. Something like this?

    Please Login or Register  to view this content.
    however im not sure if the "Find" fails or if the find is successful, the outcome of column width...

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Set up a multi-dimensional array

    You are setting the widths of all columns, not the column you've found.
    Please Login or Register  to view this content.

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Set up a multi-dimensional array

    Or:
    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)

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