vba code to split text code example
Example 1: vba split string
Dim arr() As String
Dim name As Variant
arr = Split("John:Jane:Paul:Sophie", ":")
For Each name In arr
Debug.Print name
Next
Example 2: vba split string
Dim names() As String
names = Split( "John Paul Smith" ,",")