Here is another way of doing it...( An array entered formula.. use Ctrl + shift + enter to confirm it.)
Formula:
=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)
Bookmarks