Results 1 to 2 of 2

Thread: How to combine multiple 2D arrays

  1. #1

    How to combine multiple 2D arrays



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have this code, two 6x1 arrays and I want to combine them to make 6x2:
    Code:
    Sub CombineArray()
        a = Evaluate("INDEX(ABS(A1:A6),)+ INDEX(ABS(B1:B6),)")
        b = Evaluate("INDEX(ABS(C1:C6),)+ INDEX(ABS(D1:D6),)")
        
    End Sub
    Can I combined it without using loop?
    If its not possible, how do I combine it using loop.

    These are only part of my logic. What I want is to combine multiple arrays,
    say I have, 6x1,6x2,6x3 etc. and combined into one 2D array 6x6.

  2. #2
    Conjurer snb's Avatar
    Join Date
    May 2013
    Posts
    374
    Articles
    0
    Excel Version
    2020
    Code:
    Sub M_snb()
        [A1:F6].Offset(, 9) = [if(column(A1:F6)<6,A1:F6 + offset($A1:$F6,0,1),A1:F6)]
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •