Note: The other languages of the website are Google-translated. Back to English
English English
  • Documents
  • Excel
  • How to split text by space/comma/delimiter in Excel?

How to split text by space/comma/delimiter in Excel?

If you have a column list of data and you want to split them into several columns by a specific delimiter just like the below screenshots shown, how can you split them in Excel? Maybe some of users think of the Text to Column function only, but now I will introduce not only Text to Columns function, but also a VBA code for you.


Split text strings into multiple columns by space/comma/delimiter by Text to Columns feature

Text to Columns feature is very useful to split a list to multiple columns in Excel. This method is talking about how to split data by specified delimiter with Text to Column feature in Excel. Please do as follows:

1. Select the column list you want to split by delimiter, and click Data > Text to Columns. See screenshot:

2. Then a Convert Text to columns Wizard dialog pops out, and check Delimited option, and click Next button. See screenshot:

3. In the opening Convert to Text to Columns Wizard - Step 2 of 3 dialog box, please check the delimiter you need to split the data by.

Note: If you need to split your text string by a special delimiter, please check the Other option, and then type the delimiter into following box.

4. Click Finish. Now you can see the column list in selection has been split into multiple columns by the specified delimiter.

Extract numbers (or text) only from one cell/column into different columns/rows

Kutools for Excel enhances its Split Cells utility and supports to batch extract all text characters or numbers from one cell/column into two columns/rows.



Kutools for Excel - Includes more than

300
handy tools for Excel. Full feature free trial
30
-day, no credit card required! Get It Now

Split text strings into multiple rows/columns by space/comma/delimiter with Kutools for Excel

Above method can only split text strings into multiple columns. This method will introduce Kutools for Excel's Split Cells utility to split text strings into multiple rows or columns by specified delimiter in Excel easily.

Kutools for Excel - Includes more than

300
handy tools for Excel. Full feature free trial
30
-day, no credit card required! Free Trial Now!

1. Select the range you will split text strings (in our case we select the range A1:A9 ), and click Kutools > Text > Split Cells.
doc split text 01

2. In the opening Split Cells dialog box, please check the Split to Rows option or Split to Columns options as you need in the Type section, next specify a delimiter in the Specify a separator section, and click the Ok button. See screenshot above:

Now another Split Cells dialog box pops out, please select the first cell of destination range and click the OK button.
doc split text to rows columns 10

Kutools for Excel - Includes more than

300
handy tools for Excel. Full feature free trial
30
-day, no credit card required! Get It Now


Demo: Split text strings into multiple rows/columns by space/comma/delimiter


Kutools for Excel includes more than 300 handy tools for Excel, free to try without limitation in 30 days. Download and Free Trial Now!


Relative Articles:


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by
80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than
    300
    powerful features
    . Supports Office/Excel
    2007-2019 and 365
    . Supports all languages. Easy deploying in your enterprise or organization. Full features
    30
    -day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by
    50%
    , and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (29)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
hina excel ghskj t'amfngeh 'afkndjgb s'difhjsdfnsalodfhakaf
This comment was minimized by the moderator on the site
:D It's cool! P.S. Why do I need to add more words here... :-?
This comment was minimized by the moderator on the site
It very simple and easy to understand.
This comment was minimized by the moderator on the site
Thanks for this information. It's very useful and easy to understand.
This comment was minimized by the moderator on the site
Please enter text of your comment!
This comment was minimized by the moderator on the site
Kudos to you guys you make my day
This comment was minimized by the moderator on the site
i need to sperate a word from sentence in excel sheet which is present in the single cell. eg : abcds ----- sri
This comment was minimized by the moderator on the site
This saved me hours of retyping a list of addresses. THANK YOU!!!!
This comment was minimized by the moderator on the site
Thanks god, and by that I mean you for this. Saved me a lot work. Thank you again.
This comment was minimized by the moderator on the site
THAK YOU!!!
This comment was minimized by the moderator on the site
"172.22.118.13
255.255.255.192
172.22.118.1"

how do i split that cell information into 3 columns?
This comment was minimized by the moderator on the site
Hi Huy,
How do you want to split the cells by? By length? By delimiter of dot? Or others?
This comment was minimized by the moderator on the site
Thank you so much for posting this, it's really very helpful at times.
This comment was minimized by the moderator on the site
Hello, How do i separete a long sentence into columns like


12534_MK_EC0102-Kanyuambora_OUTA 172.22.118.13 255.255.255.192 172.22.118.1. I need the process of separating to columns of: Site ID 12534_MK_EC0102; Site Name Kanyuambora_OUTA;IP 172.22.118; Mask 255.255.255; Gateway 172.22.118.1. Kindly assist.
This comment was minimized by the moderator on the site
Hi Cosmas,
You can apply the Text to Columns feature on the Data tab in Excel Ribbon. In the Wizard, please set both delimiters of space and custom delimiters -, and it will split your long cell content to desired columns.
This comment was minimized by the moderator on the site
You can use the FIND and LEN commands to separate fields, for example :
A1: 12534_MK_EC0102-Kanyuambora_OUTA 172.22.118.13 255.255.255.192 172.22.118.1.
B1: =FIND(" ",$A$1) B2: =FIND(" ",$A$1,B1+1) B3: "Fill Down From B2"
C1: =LEFT($A$1,B1) C2: =RIGHT(LEFT($A$1,B2),B2-B1) C3: "Fill Down From C2"
This comment was minimized by the moderator on the site
Hi Cosmas,
How do you want to split the lone sentences by? In your example, you can split the sentence by the delimiter “_” or “;” or “.”
Just try them as you need!
This comment was minimized by the moderator on the site
Thanks. It is really helpful.
This comment was minimized by the moderator on the site
Ok, so here is a problem I am stuck on that I cannot seem to resolve. I am looking to break up a long string of text with the following requirements:
1) Text can only be broken up at a space (not in the middle of a word)
2) The total length for each parsed cell must be as close to 40 characters as it can get using the space rule above.

For example, this comes in a single cell: "It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief". In this example, I would expect the formula to break up this text into 4 cells:

It was the best of times, it was the
worst of times, it was the age of
wisdom, it was the age of foolishness,
it was the epoch of belief

I keep getting wrapped around the axle trying to use a combo of left,mid,right and search/find formulas, but not only is it very inelegant, but as soon as I run into a non-unique word, my find formula breaks down.
This comment was minimized by the moderator on the site
This just shows how horrible excel is...how about a SPLIT function?? Duh...
This comment was minimized by the moderator on the site
Hi Bob,
Kutools for Excel has released this feature – Split Cells. This feature can not only split cells by all kinds of delimiters to columns, but also split cells to rows. What’s more, it supports to split number and text from selected cells too.
This comment was minimized by the moderator on the site
How do we split kyzwell5konfgwell3k into columns. I need only the on has to be selected as delimit and separate into two words.
This comment was minimized by the moderator on the site
Hi Sunny,
The Text to Columns (Excel built-in feature) supports to split a cell to columns by a given character, and the Split Cells feature of Kutools for Excel also supports to split cells by one character.
If you need to split cells by a string of characters, you’d better apply a VBA macro.
This comment was minimized by the moderator on the site
thanks so much, this really made my life easier!
This comment was minimized by the moderator on the site
Thank you This Saved my time !
This comment was minimized by the moderator on the site
hi ,

i have flat file which having delimiter so i want to read the value of passing position having before and after delimiter. is there any way to get these vale
This comment was minimized by the moderator on the site
Hi, I do not understand your problem clearly. If you want to get the values before and after a specific delimiter separately, the both of methods mentioned in this tutorial can help you, you just need to change the delimiter to your need, and follow the steps to finish. Or you can give me more details about your problem for me to get it clearly.
This comment was minimized by the moderator on the site
Hi
I have a string like a, b,c,d,,a,d,e,f,a,b,f... etc. I want to replace a value of 'd' which having a Position of 7th after delimiter. Can you suggest how to find a position after delimiter and replace exact Position value.
This comment was minimized by the moderator on the site
Hi, Kanchan, here is a code you can try:
Sub changeText()
    Dim xSplit, xStr As String
    Dim xPos As Integer
    Dim xArr As Variant
    Dim xRng, xSetRng As Range
    On Error Resume Next
    Set xRng = Application.InputBox("Select the cell you want to extract:", "Kutools for Excel", , , , , , 8)
    xSplit = Application.InputBox("Type the delimiter:", "Kutools for Excel", , , , , , 2)
    xPos = Application.InputBox("Type nth delimiter:", "Kutools for Excel", , , , , , 1)
    xStr = Application.InputBox("Type the string or character you want to replace with:", "Kutools for Excel", , , , , , 2)
    Set xSetRng = Application.InputBox("Select the cell to place result:", "Kutools for Excel", , , , , , 8)
    xArr = Split(xRng.Text, xSplit)
    xArr(xPos) = xStr
    xSetRng.Value = Join(xArr, ",")
End Sub

Hope it can help you.
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL