I hope it's obvious that:
- this macro resides in the macromodule it refers to
- the ranges (A1:A6, B1:B6, etc.) have to be adapted to your specific situation
- the delimiter in column C is ", " and may have to be adapted to your specific situation
Your feedback is too limited to analyse what could have caused the error.Code:Sub M_snb() sn = Split(Join([transpose(A2:A6 & "_" & B2:B6 & "_" & substitute(C2:C6,", ","," & A2:A6 & "_" & B2:B6 & "_"))], ","), ",") Cells(20, 1).Resize(UBound(sn) + 1) = Application.Transpose(sn) Cells(20, 1).CurrentRegion.TextToColumns , , , , False, False, False, False, True, "_" End Sub
Posting a sample workbook could shed some more light.




Reply With Quote

Bookmarks