Results 1 to 6 of 6

Thread: Combining data of Two Array or Range

  1. #1
    Member
    Join Date
    Nov 2011
    Posts
    41
    Rep Power
    0

    Combining data of Two Array or Range

    Hi All,

    Today i came across a problem i have to combine data of two array into a new array can any one plaese help me i doing this .
    if this is not possible the is there any way to combine two range of data into single one.




    thanks in advance

  2. #2
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    13
    Can you provide us with some more details please. What kind of arrays are you talking about... VBA coded arrays or cell ranges? Do these arrays have one or two dimensions? Exactly how did you want the elements of the arrays combined? Providing us with a small example showing what each array contains before processing and what the resulting array should look like afterwards would help us out tremendously.

  3. #3
    Member
    Join Date
    Nov 2011
    Posts
    41
    Rep Power
    0
    thanks for quick reply.

    this is a 2D array of VBA which holds the data of two ranges.And I want this data to be displayed as in example:
    arr1= 1 2 3
    2 3 4
    arr2= q q r
    s t u
    resArr=1 2 3
    2 3 4
    p q r
    s t u

  4. #4
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    13
    Quote Originally Posted by princ_wns View Post
    thanks for quick reply.

    this is a 2D array of VBA which holds the data of two ranges.And I want this data to be displayed as in example:
    arr1= 1 2 3
    2 3 4
    arr2= q q r
    s t u
    resArr=1 2 3
    2 3 4
    p q r
    s t u
    This is not a trivial thing to do; however, here is a website that includes code to do it...

    VBA Arrays

    There is a description of how to use the code in a section titled "CombineTwoDArrays". To go directly to the code, search the webpage for this text string...

    Public Function CombineTwoDArrays
    Last edited by Rick Rothstein; 04-05-2012 at 08:55 AM.

  5. #5
    Member
    Join Date
    Nov 2011
    Posts
    41
    Rep Power
    0
    Thanks Rick for your quick reply.

  6. #6
    Junior Member
    Join Date
    Oct 2012
    Posts
    1
    Rep Power
    0
    Quote Originally Posted by Rick Rothstein View Post
    Can you provide us with some more details please. What kind of arrays are you talking about...
    Hi, I have another interesting example.

    I have two or more columns that I would like to combine to matrix. I have tried solutions like =(c_1:c_2) and =CHOOSE({1;2};TRANSPOSE(c_1;TRANSPOSE(c_2)), but they work only for ordinary cell values or easy formulas like =ROW(2:5)-ROW(1:4) (that creates ones).
    My columns are complicated formulas like

    =IFERROR(INDEX(ROW(3:10)-ROW(3:10); ROWS(C$1:$C3)); IFERROR(INDEX(ROW(4:5)-ROW(3:4); ROWS(C$1:$C3)-ROWS(ROW(3:10)-ROW(3:10))); "")).

    This is a complicated formula for a single cell.
    How could I combine two such columns into matrix?
    I would be the happiest if Excel would come out with some simple formula like JOIN.

    Thank you
    Marko

Similar Threads

  1. Replies: 2
    Last Post: 05-23-2013, 02:53 PM
  2. Replies: 14
    Last Post: 01-26-2013, 04:58 AM
  3. Combining Functions To Create Array Formula
    By Ryan_Bernal in forum Excel Help
    Replies: 3
    Last Post: 01-07-2013, 12:38 PM
  4. Replies: 3
    Last Post: 05-14-2012, 11:30 AM
  5. Replies: 3
    Last Post: 04-08-2012, 09:44 AM

Posting Permissions

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