This is all you need:
More on dictionaries:Sub M_snb() sn = Cells(3, 1).CurrentRegion With CreateObject("scripting.dictionary") For j = 2 To UBound(sn) st = Split(sn(j, UBound(sn, 2)), "[") For jj = 1 To UBound(st) .Item("P_" & .Count) = Array(Val(st(jj)), sn(j, 2), sn(j, 3), sn(j, 4), sn(j, 5), "[" & st(jj)) Next Next Cells(40, 1).Resize(.Count, UBound(sn, 2)) = Application.Index(.items, 0, 0) End With End Sub
http://www.snb-vba.eu/VBA_Dictionary_en.html