Just for source workbook and the result that you want.
Sub test()
Dim a, e, i As Long, ii As Long, txt As String, w
Const delim As Long = 2
With Cells(1).CurrentRegion
.Sort .Cells(1), 1, , , , , , 1
a = .Value
End With
a(1, 7) = Split(a(1, 7), "/")(0)
With CreateObject("Scripting.Dictionary")
.CompareMode = 1
For i = 2 To UBound(a, 1)
For ii = 1 To 5
txt = txt & Chr(2) & a(i, ii)
Next
If Not .exists(txt) Then
ReDim w(1 To 6): w(6) = Space(delim) & "terms:"
For ii = 1 To 5
w(ii) = IIf(ii = 1, a(i, ii) & ":", Space(delim) & _
a(1, ii) & ": " & a(i, ii))
Next
Else
w = .Item(txt)
End If
ReDim Preserve w(1 To UBound(w) + 1)
w(UBound(w)) = Space(delim * 2) & "- " & a(i, 6)
For ii = 7 To 9
w(UBound(w)) = w(UBound(w)) & vbNewLine & Space(delim * 3) & a(1, ii) & ": " & a(i, ii)
Next
.Item(txt) = w: txt = ""
Next
For Each e In .keys
.Item(e) = Join(.Item(e), vbNewLine)
Next
Open ThisWorkbook.Path & "\test.txt" For Output As #1
Print #1, Join(.items, vbNewLine & vbNewLine)
Close #1
End With
End Sub

Originally Posted by
Mark L
I'm out !
I don't think you are IN anyway.
Bookmarks