+ Reply to Thread
Results 1 to 9 of 9

Multi-Dimensional concatif coding

Hybrid View

  1. #1
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Multi-Dimensional concatif coding

    Here is another way of doing it...( An array entered formula.. use Ctrl + shift + enter to confirm it.)
    Formula: copy to clipboard
    =JoinC(IF(IF($C$18:$I$18=$B2,INDEX($C$19:$I$383,MATCH(C$1,$B$19:$B$383,0))),$C$17:$I$17),", ")


    Here is the JoinC Code with will concatenate the results.
    Function JoinC(ByRef x As Variant, ByRef Delim As String) As String
        '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        '           Developed by Vikas Gautam                               '
        '         Forum Expert at ExcelForum.Com                            '
        'For Concatenating Arrays or Ranges having One Row and Many Columns '
        '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
        dLen = Len(Delim)
        With Application
            SourceArray = .Transpose(.Transpose(x))
            Delim2 = Delim & Delim
            Temp = Replace(Join(SourceArray, Delim), Delim2, Delim)
            
            Do While InStr(1, Temp, Delim2, 1) > 0
                Temp = Replace(Temp, Delim2, Delim)
            Loop
        End With
        
        If Left(Temp, dLen) = Delim Then Temp = Mid(Temp, dLen + 1, Len(Temp))
        If Right(Temp, dLen) = Delim Then Temp = Left(Temp, Len(Temp) - dLen)
        JoinC = Temp
    
    End Function
    You didn't provided the Row and Column No. of your output table below.
    So I Assumed like this:-
    	B	       C	            D               E
    1		   2/1/20XX	       2/2/20Xx	        2/3/20XX
    2	Team A			
    3	Team B			
    4	Team C
    Note:- Put the above formula in C2 by using CTRL + SHIFT + ENTER and Drag downwards and Sideways.

    Table3.JPG



    Here is the link you can find the JoinC Code:-
    Concatenating Rows (JoinR) and Columns (JoinC)
    Last edited by Vikas_Gautam; 02-04-2015 at 01:05 AM.
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  2. #2
    Registered User
    Join Date
    01-27-2015
    Location
    Houston, USA
    MS-Off Ver
    2010
    Posts
    3

    Re: Multi-Dimensional concatif coding

    Hi Vikas, your function with JoinC comes with an error in value. I did use ctrl Shift Enter to go along with the array data. And when I took out 'INDEX($C$19:$I$30,MATCH(C$1,$B$19:$B$30,0))'.. it results in a reference error. Can you help me out once again?
    Last edited by wildeye87; 02-03-2015 at 04:11 PM.

+ 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. [SOLVED] Multi-dimensional VLOOKUP
    By LadyS in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-25-2014, 12:37 PM
  2. [SOLVED] Dim multi dimensional array
    By jdfjab in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-06-2012, 09:08 AM
  3. Multi-Dimensional Arrays
    By ajocius in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-09-2009, 11:20 AM
  4. [SOLVED] Multi Dimensional Array
    By andym in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-10-2006, 03:29 AM
  5. [SOLVED] Multi-Dimensional Array Let & Get
    By Trip in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-21-2005, 04:05 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