Home > Blockchain >  VBA: How to Convert Text to Columns with Semicolon
VBA: How to Convert Text to Columns with Semicolon

Time:01-27

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

CodePudding user response:

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

CodePudding user response:

Solved, Thanks

Using the code below:

enter image description here

  •  Tags:  
  • Related