'VBA: How to Convert Text to Columns with Semicolon

How to Convert Text to Columns with Semicolon.

My excel has ";;", I need to show one empty cell when I Convert Text to Columns.

Example:

enter image description here

After run VBA and I need to show like this below:

enter image description here



Solution 1:[1]

Please See Thee Bellow Mention Code

Sub SplitName()

Dim txt As String

Dim i As Integer

Dim fullname As Variant

txt = ActiveCell.Value

fullname = Split(txt, ";;")

For i = o To UBound(fullname)

Cells(1, i + 1).Value = fullname(i)

Next ienter image description here

End Sub

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jahanzaib Sehar