+ Reply to Thread
Results 1 to 4 of 4

Use an array to iterate through a matrix

  1. #1
    Registered User
    Join Date
    03-27-2019
    Location
    Illinois
    MS-Off Ver
    Unk
    Posts
    2

    Use an array to iterate through a matrix

    I’m new to arrays. Is it possible to use an array to iterate through matrix values? If so, how would this formula be structured?

    Below the calculation changes if it aA aB aC aD or aE...bA bB... an so forth.


    A B C D E
    a
    b
    c
    d
    e

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Use an array to iterate through a matrix

    Hello Aoiumi. Welcome to the forum.

    The simplest way would be to lay out a table of concatenated strings like this with formula in B2 filled down and across
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    A
    B
    C
    D
    E
    F
    1
    A
    B
    C
    D
    E
    2
    a
    aA
    aB
    aC
    aD
    aE
    3
    b
    bA
    bB
    bC
    bD
    bE
    4
    c
    cA
    cB
    cC
    cD
    cE
    5
    d
    dA
    dB
    dC
    dD
    dE
    6
    e
    eA
    eB
    eC
    eD
    eE


    Output would be with this formula in A8 and filled down until you get blanks.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    A
    8
    aA
    9
    aB
    10
    aC
    11
    aD
    12
    aE
    13
    bA
    14
    bB
    15
    bC
    16
    bD
    17
    bE
    18
    cA
    19
    cB
    20
    cC
    21
    cD
    22
    cE
    23
    dA
    24
    dB
    25
    dC
    26
    dD
    27
    dE
    28
    eA
    29
    eB
    30
    eC
    31
    eD
    32
    eE
    33






    If you prefer to do it without the table concatenate in formula and enter essentially the same formula in A8. Fill down until you get blanks.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    While these are array formulas they do not have to be committed with CSE. Just Enter will do.
    Dave

  3. #3
    Registered User
    Join Date
    03-27-2019
    Location
    Illinois
    MS-Off Ver
    Unk
    Posts
    2

    Re: Use an array to iterate through a matrix

    Thank you so much for the help! I really appreciate it.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Use an array to iterate through a matrix

    You are welcome.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Iterate through rows, or create an array?
    By fkoehler in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2018, 01:49 PM
  2. [SOLVED] Iterate through Array While in For Each loop
    By stusic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2017, 03:08 PM
  3. [SOLVED] Iterate over two index variables to reorder an array
    By samot79 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-22-2016, 09:31 AM
  4. Iterate through Worksheets Building an Array
    By MaterialMaster in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2014, 04:34 PM
  5. [SOLVED] Iterate Array Names with Integers
    By AlvaroSiza in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-06-2014, 10:32 AM
  6. Replies: 2
    Last Post: 06-19-2013, 12:59 PM
  7. Populate a Single Dimensional Array with two Dim Array (matrix)
    By Benjamin1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-03-2011, 12:49 PM

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