So I already have the list of permutations, but i\'d like to convert it to combinations. So i have a single list of names \"john\" \"mike\" \"tom\", and these have already been
Try this:
Sub NoRepetition()
Dim NameList As Variant, NameVal As Variant, NameVal2 As Variant
Dim Iter As Long, OutputList As Range, NotYet As Boolean
NameList = Range("A1:A5").Value
Iter = 1
For Each NameVal In NameList
For Each NameVal2 In NameList
LRow = Range("C" & Rows.Count).End(xlUp).Row
Set OutputList = Range("C1:C" & LRow)
NotYet = (Application.CountIf(OutputList, NameVal2) = 0)
If NameVal2 <> NameVal And NotYet Then
Range("C" & Iter).Value = NameVal
Range("D" & Iter).Value = NameVal2
Iter = Iter + 1
End If
Next NameVal2
Next NameVal
End Sub
The additional concept is simple: just add a check to see if the name already exists in the first column. If it does, skip that combination. If not, put it in.
Screenshot:
Let us know if this helps.