Ricklou
you mention a macro so you know your way around a spreadsheet. can I assume you are taking care of columns A,B,C ? you do realize that you could have many thousands of matches? you show col C to be on line 5, but your wording says col 1. I will assume everything starts on line 5.
i let the code below run for 5 min using random data. 30000 matches later and not even a third of the way done. good luck
Sub Button1_Click()
Ln = 5 'line for display
For r = 6 To 48
For s = r + 1 To 49
For t = s + 1 To 50
For u = t + 1 To 51
For v = u + 1 To 52
For w = v + 1 To 53
ts = Cells(5, 3) ' target skip
st = Cells(r, 2) + Cells(s, 2) + Cells(t, 2) + Cells(u, 2) + Cells(v, 2) + Cells(w, 2) ' skip total
If st = ts Then GoSub display
Next w
Next v
Next u
Next t
Next s
Next r
Exit Sub
display:
Cells(Ln, 4) = Cells(r, 1)
Cells(Ln, 5) = Cells(s, 1)
Cells(Ln, 6) = Cells(t, 1)
Cells(Ln, 7) = Cells(u, 1)
Cells(Ln, 8) = Cells(v, 1)
Cells(Ln, 9) = Cells(w, 1)
Ln = Ln + 1
Return
End Sub