1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
Sub x() Dim s As String s = ",21, ,22, ,23, ,24, ,25, ,26, ,27, ,28, ,29, ,30, ,31, ,32, ,33, ,34, ,35, ,36, ,37, ,38, ,39, " s = Replace(s, " ", "") ' remove spaces, easier to work with s = Replace(s, ",,", "|") ' replace 2 commas with something else s = Replace(s, ",", "") ' replace the remaining singular commas (lead, trail) with blank Dim arr() As String arr = Split(s, "|") Dim part As Variant For Each part In arr MsgBox part Next End Sub