Перейти до основного матеріалу

Як розділити текст на пробіл / кому / роздільник в Excel?

Якщо у вас є список даних стовпців, і ви хочете розділити їх на кілька стовпців за допомогою певного роздільника, як показано на скріншотах нижче, як можна розділити їх у Excel? Можливо, деякі користувачі думають лише про функцію "Текст у стовпець", але тепер я представив не лише функцію "Текст у стовпці", але й код VBA для вас.


Розбийте текстові рядки на кілька стовпців за пробілом / комою / роздільником за функцією "Текст у стовпці"

Функція "Текст у стовпці" дуже корисна для розділення списку на кілька стовпців у програмі Excel. Цей метод говорить про те, як розділити дані за вказаним роздільником за допомогою функції «Текст у стовпець» у Excel. Будь ласка, виконайте наступне:

1. Виберіть список стовпців, який потрібно розділити на роздільник, і натисніть дані > Текст у стовпці. Дивіться знімок екрана:

2. Тоді a Майстер перетворення тексту в стовпці діалогове вікно вискакує та перевіряє Розмежовано і натисніть МАЙБУТНІ кнопку. Дивіться знімок екрана:

3. У початковому діалоговому вікні "Перетворити в текст у стовпці" - Крок 2 з 3, перевірте розділювач, на який потрібно розділити дані.

примітки: Якщо вам потрібно розділити текстовий рядок на спеціальний роздільник, перевірте Інше , а потім введіть роздільник у наступне поле.

4. клацання обробка. Тепер ви можете бачити, що вибраний список стовпців розділений на кілька стовпців зазначеним роздільником.

Витяг чисел (або тексту) лише з однієї комірки / стовпця в різні стовпці / рядки

Kutools для Excel покращує його Розділені клітини утиліта та підтримує пакетне вилучення всіх текстових символів або чисел з однієї комірки / стовпця у два стовпці / рядки.



Kutools для Excel - Доповніть Excel понад 300 основними інструментами. Насолоджуйтесь повнофункціональною 30-денною БЕЗКОШТОВНОЮ пробною версією без кредитної картки! Get It Now

Розділіть текстові рядки на кілька рядків/стовпців пробілом/комою/роздільником за допомогою Kutools для Excel

Наведений вище метод може лише розділяти текстові рядки на кілька стовпців. Цей метод представить Kutools для Excel Розділені клітини утиліта для легкого розділення текстових рядків на кілька рядків або стовпців за вказаним роздільником у програмі Excel.

Kutools для Excel - Містить понад 300 основних інструментів для Excel. Насолоджуйтесь повнофункціональною 30-денною БЕЗКОШТОВНОЮ пробною версією без кредитної картки! Скачати зараз!

1. Виберіть діапазон, за яким ви розділите текстові рядки (у нашому випадку ми вибираємо діапазон A1: A9), і натисніть Кутулс > текст > Розділені клітини.
doc розділений текст 01

2. У діалоговому вікні Split Cells відкрийте діалогове вікно Розділити на ряди варіант або Розділити на стовпці варіанти, як вам потрібно в тип далі вкажіть роздільник у Вкажіть роздільник і натисніть на Ok кнопку. Дивіться знімок екрана вище:

Тепер з’явиться інше діалогове вікно «Розділити клітинки», виберіть першу клітинку цільового діапазону та натисніть на OK кнопки.
doc розділити текст на стовпці рядків 10

Kutools для Excel - Доповніть Excel понад 300 основними інструментами. Насолоджуйтесь повнофункціональною 30-денною БЕЗКОШТОВНОЮ пробною версією без кредитної картки! Get It Now


Демонстрація: розділіть текстові рядки на кілька рядків / стовпців пробілом / комою / роздільником


Kutools для Excel: понад 300 зручних інструментів у вас під рукою! Почніть 30-денну безкоштовну пробну версію без обмежень функцій сьогодні. Завантажити зараз!


Відносні статті:

Найкращі інструменти продуктивності офісу

🤖 Kutools AI Aide: Революціонізуйте аналіз даних на основі: Інтелектуальне виконання   |  Згенерувати код  |  Створення спеціальних формул  |  Аналізуйте дані та створюйте діаграми  |  Викликати функції Kutools...
Популярні функції: Знайдіть, виділіть або визначте дублікати   |  Видалити порожні рядки   |  Об’єднайте стовпці або клітинки без втрати даних   |   Раунд без Формули ...
Супер пошук: VLookup за кількома критеріями    Багатозначний VLookup  |   VLookup на кількох аркушах   |   Нечіткий пошук ....
Розширений розкривний список: Швидке створення випадаючого списку   |  Залежний спадний список   |  Виберіть розкривний список, що вибирається ....
Менеджер колонок: Додайте конкретну кількість стовпців  |  Перемістити стовпці  |  Перемкнути статус видимості прихованих стовпців  |  Порівняйте діапазони та стовпці ...
Особливості: Фокус сітки   |  Перегляд дизайну   |   Велика панель формул    Диспетчер робочих книг і аркушів   |  Бібліотека ресурсів (автотекст)   |  Вибір дати   |  Об’єднайте робочі аркуші   |  Шифрування/розшифрування клітинок    Надсилайте листи за списком   |  Супер фільтр   |   Спеціальний фільтр (фільтр жирний/курсив/закреслений...) ...
Топ-15 наборів інструментів12 текст Tools (додати текст, Видалити символи, ...)   |   50 + Графік типи (діаграма Ганта, ...)   |   40+ Практичний Формули (Розрахуйте вік на основі дня народження, ...)   |   19 вставка Tools (Вставте QR-код, Вставити зображення зі шляху, ...)   |   12 Перетворення Tools (Числа до слів, Валютна конверсія, ...)   |   7 Злиття та розділення Tools (Розширені комбіновані ряди, Розділені клітини, ...)   |   ... і більше

Покращуйте свої навички Excel за допомогою Kutools для Excel і відчуйте ефективність, як ніколи раніше. Kutools для Excel пропонує понад 300 додаткових функцій для підвищення продуктивності та економії часу.  Натисніть тут, щоб отримати функцію, яка вам найбільше потрібна...

Опис


Вкладка Office Передає інтерфейс із вкладками в Office і значно полегшує вашу роботу

  • Увімкніть редагування та читання на вкладках у Word, Excel, PowerPoint, Publisher, Access, Visio та Project.
  • Відкривайте та створюйте кілька документів на нових вкладках того самого вікна, а не в нових вікнах.
  • Збільшує вашу продуктивність на 50% та зменшує сотні клацань миші для вас щодня!
Comments (29)
No ratings yet. Be the first to rate!
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.
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
Thank you This Saved my time !
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
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
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
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
Thanks. It is really helpful.
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,
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
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,
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
Thank you so much for posting this, it's really very helpful at times.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations