Try
![]()
Sub test() Dim e, r As Range, i As Long With CreateObject("System.Collections.SortedList") For Each e In Array("c", "f", "h") For Each r In Range(e & "4", Range(e & Rows.Count).End(xlUp)) .Item(Val(Split(r.Value)(0))) = r.Value Next Next For i = 0 To .Count - 1 Cells(i + 4, "j").Value = .GetByIndex(i) Next End With End Sub
Bookmarks