Sub GetUniqueCouples()
Dim i, j, k, lastA, lastB As Long
Dim MyArray() As String
lastA = Cells(Rows.Count, 1).End(xlUp).Row
lastB = Cells(Rows.Count, 2).End(xlUp).Row
ReDim MyArray(lastA * lastB)
MyArray(0) = "Result"
k = 1
For i = 2 To lastA
For j = 2 To lastB
MyArray(k) = Cells(i, "A").Value & Cells(j, "B").Value
k = k + 1
Next j
Next i
Range("D1:D" & UBound(MyArray) + 1) = WorksheetFunction.Transpose(MyArray)
Cells(1, "E").Value = Cells(1, "D").Value
Range("D:D").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("E1"), Unique:=True
'Range("D:D").ClearContents
End Sub
Sub GetUniqueCouples()
Dim i, j, k,[COLOR=#ff0000] l,[/COLOR] lastA, lastB[COLOR=#ff0000], lastC[/COLOR] As Long
Dim MyArray() As String
lastA = Cells(Rows.Count, 1).End(xlUp).Row
lastB = Cells(Rows.Count, 2).End(xlUp).Row
[COLOR=#ff0000]lastC = Cells(Rows.Count, 3).End(xlUp).Row[/COLOR]
ReDim MyArray(lastA * lastB [COLOR=#ff0000]* lastC)[/COLOR]
MyArray(0) = "Result"
k = 1
For i = 2 To lastA
For j = 2 To lastB
[COLOR=#ff0000]For l = 2 to lastC[/COLOR]
MyArray(k) = Cells(i, "A").Value & Cells(j, "B").Value[COLOR=#ff0000] & Cells(l, "C").Value[/COLOR]
k = k + 1
[COLOR=#ff0000]Next l[/COLOR]
Next j
Next i
Range("D1:D" & UBound(MyArray) + 1) = WorksheetFunction.Transpose(MyArray)
Cells(1, "E").Value = Cells(1, "D").Value
Range("D:D").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("E1"), Unique:=True
'Range("D:D").ClearContents
End Sub