I have an Excel table like this
Now from the second column, I want to split them into small substring and group them in each ID group, like this
Please let me know how I can do that programmatically.
Since I'm new from Excel, I have tried this but it does not work: https://support.microsoft.com/en-us/office/split-text-into-different-columns-with-the-convert-text-to-columns-wizard-30b14928-5550-41f5-97ca-7a3e9c363ed7
Collection
objects to transform dataOption Explicit
Sub Demo()
Dim i As Long, j As Long
Dim arrData, arrRes, aTxt, sTxt As String
Dim idCol As New Collection, ruleCol As New Collection
arrData = ActiveSheet.Range("A1").CurrentRegion.Value
For i = LBound(arrData) To UBound(arrData)
aTxt = Split(arrData(i, 2), ">"): sTxt = ""
For j = LBound(aTxt) To UBound(aTxt)
idCol.Add arrData(i, 1)
sTxt = sTxt & ">" & aTxt(j)
ruleCol.Add Mid(sTxt, 2)
Next j
Next i
ReDim arrRes(1 To idCol.Count, 1)
For i = 1 To idCol.Count
arrRes(i, 0) = idCol(i)
arrRes(i, 1) = ruleCol(i)
Next
Sheets.Add
Range("A1").Resize(idCol.Count, 2).Value = arrRes
End Sub