Visual Basic for Applications


Parse comma-delimited string into columns:

Sub SeperateString()
Dim fullname As String, commaposition As Integer, i As Integer
For i = 3 To 7
fullname = Cells(i, 2).Value
commaposition = InStr(fullname, ",")
Cells(i, 3).Value = Mid(fullname, commaposition + 2)
Cells(i, 4).Value = Left(fullname, commaposition - 1)
Next i
End Sub

About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s