VBA Code to Split Text into Columns in Excel

This code splits the text in the selected cells into separate columns based on a delimiter.

VBA Code:

Sub SplitTextIntoColumns()
    Selection.TextToColumns Destination:=Selection, DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, _
        Tab:=False, Semicolon:=False, Comma:=True, Space:=False, _
        Other:=False, FieldInfo:=Array(1, 1)
End Sub

Check All VBA Codes

Join Our Telegram Group techguruplus telegram group Join Our WhatsApp Group techguruplus whatsapp group

Leave a Comment