Perhaps something like this:-
Data:- Starting "A1"
[TABLE="width: 544"]
<colgroup><col width="82" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2929;"> <col width="122" style="width: 92pt; mso-width-source: userset; mso-width-alt: 4352;"> <col width="96" style="width: 72pt; mso-width-source: userset; mso-width-alt: 3413;"> <col width="104" style="width: 78pt; mso-width-source: userset; mso-width-alt: 3697;"> <col width="64" style="width: 48pt;" span="5"> <tbody>[TR]
[TD="class: xl63, width: 82, bgcolor: transparent"]
ID number[/TD]
[TD="class: xl63, width: 122, bgcolor: transparent"]
Name[/TD]
[TD="class: xl63, width: 96, bgcolor: transparent"]
Name[/TD]
[TD="class: xl63, width: 104, bgcolor: transparent"]
Name[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]
Name[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]
Name[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]
Name[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]
Name[/TD]
[TD="class: xl63, width: 64, bgcolor: transparent"]
Name[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 1[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 1[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 2[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 3[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 4[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 5[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 6[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 7[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 8[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 2[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 2[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 3[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 3[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 8[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 9[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 10[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 11[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 4[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 4[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 5[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 6[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 7[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 8[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 9[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 10[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 11[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 5[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 10[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 11[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 12[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 13[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 14[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 15[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 6[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 1[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 2[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 3[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 4[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 7[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 2[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 3[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 8[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 1[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 2[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 3[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 4[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 9[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 10[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 11[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 12[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 13[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 14[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 15[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 10[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 9[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 10[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 11[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 12[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 11[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 8[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 9[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 10[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 11[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 12[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 13[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 14[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 15[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]
I/D 12[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 2[/TD]
[TD="class: xl63, bgcolor: transparent"]
Mem 3[/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[TD="class: xl63, bgcolor: transparent"] [/TD]
[/TR]
</tbody>[/TABLE]
Results:- Starting "K1"
[TABLE="width: 263"]
<colgroup><col width="94" style="width: 71pt; mso-width-source: userset; mso-width-alt: 3356;"> <col width="64" style="width: 48pt;" span="4"> <tbody>[TR]
[TD="class: xl65, width: 94, bgcolor: transparent"]
Mem Name[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"]
I/D's[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 1[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 1, I/D 6, I/D 8[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 2[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 1, I/D 2, I/D 6, I/D 7, I/D 8, I/D 12[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 3[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 1, I/D 2, I/D 6, I/D 7, I/D 8, I/D 12[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 4[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 1, I/D 4, I/D 6, I/D 8[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 5[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 1, I/D 4[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 6[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 1, I/D 4[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 7[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 1, I/D 4[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 8[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 1, I/D 3, I/D 4, I/D 11[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 9[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 3, I/D 4, I/D 10, I/D 11[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 10[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 3, I/D 4, I/D 5, I/D 9, I/D 10, I/D 11[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 11[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 3, I/D 4, I/D 5, I/D 9, I/D 10, I/D 11[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 12[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 5, I/D 9, I/D 10, I/D 11[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 13[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 5, I/D 9, I/D 11[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 14[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 5, I/D 9, I/D 11[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
Mem 15[/TD]
[TD="class: xl65, bgcolor: transparent"]
I/D 5, I/D 9, I/D 11[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
</tbody>[/TABLE]
Code:-
Code:
[COLOR="Navy"]Sub[/COLOR] MG07Sep51
[COLOR="Navy"]Dim[/COLOR] Ray [COLOR="Navy"]As[/COLOR] Variant, Dn [COLOR="Navy"]As[/COLOR] Range, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Ac [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
Ray = ActiveSheet.Range("A1").CurrentRegion
[COLOR="Navy"]With[/COLOR] CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
.Add "Mem Name", "I/D'[COLOR="Green"][B]s"[/B][/COLOR]
[COLOR="Navy"]For[/COLOR] n = 2 To UBound(Ray, 1)
[COLOR="Navy"]For[/COLOR] Ac = 2 To UBound(Ray, 2)
[COLOR="Navy"]If[/COLOR] Ray(n, Ac) <> "" [COLOR="Navy"]Then[/COLOR]
[COLOR="Navy"]If[/COLOR] Not .Exists(Ray(n, Ac)) [COLOR="Navy"]Then[/COLOR]
.Add Ray(n, Ac), Ray(n, 1)
[COLOR="Navy"]Else[/COLOR]
[COLOR="Navy"]If[/COLOR] InStr(.Item(Ray(n, Ac)), Ray(n, Ac)) = 0 [COLOR="Navy"]Then[/COLOR]
.Item(Ray(n, Ac)) = .Item(Ray(n, Ac)) & ", " & Ray(n, 1)
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR] Ac
[COLOR="Navy"]Next[/COLOR] n
Range("K1").Resize(.Count, 2) = Application.Transpose(Array(.Keys, .items))
[COLOR="Navy"]End[/COLOR] With
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick