Try this
Code:
Sub Consolidator()
Dim var As Variant, varOut As Variant
Dim lng As Long
Dim lngRows As Long
Dim lngIndex As Long
Dim lngSplit As Long
var = Range("A1").CurrentRegion.Resize(, 2).Value2
For lngRows = LBound(var) To UBound(var)
lng = lng + CLng((UBound(Split(var(lngRows, UBound(var, 2)), ",")) + 2) / 2)
Next lngRows
ReDim varOut(1 To lng, 1 To 2)
lngIndex = 1
For lngRows = LBound(var) To UBound(var)
lng = CLng((UBound(Split(var(lngRows, UBound(var, 2)), ",")) + 2) / 2)
For lng = lngIndex To lngIndex + lng - 1
lngSplit = lngSplit + 1
varOut(lng, 1) = var(lngRows, UBound(var, 2) - 1)
varOut(lng, 2) = Split(var(lngRows, UBound(var, 2)) & ",", ",")(lngSplit * 2 - 2) & "," & Split(var(lngRows, UBound(var, 2)) & ",", ",")(lngSplit * 2 - 1)
Next lng
lngIndex = lng
lngSplit = 0
Next lngRows
ActiveSheet.Next.Cells(1).Resize(UBound(varOut), 2).Value = varOut
End Sub
Bookmarks