メインコンテンツへスキップ

Excelでスペース/カンマ/区切り文字でテキストを分割するにはどうすればよいですか?

データの列リストがあり、以下のスクリーンショットのように特定の区切り文字で複数の列に分割する場合、Excelでどのように分割できますか? Text to Column関数だけを考えているユーザーもいるかもしれませんが、ここでは、Text to Columns関数だけでなく、VBAコードも紹介します。


テキスト文字列をスペース/カンマ/区切り文字で複数の列に分割するテキストから列への機能

テキストから列への機能は、Excelでリストを複数の列に分割するのに非常に便利です。 このメソッドは、Excelのテキストから列への機能を使用して指定された区切り文字でデータを分割する方法について説明しています。 次のようにしてください。

1.区切り文字で分割する列リストを選択し、をクリックします 且つ > テキストから列へ。 スクリーンショットを参照してください:

2.次に、 テキストを列に変換ウィザード ダイアログが飛び出し、チェックします 区切り文字付き オプションをクリックして Next ボタン。 スクリーンショットを参照してください:

3. [テキストから列への変換ウィザード-ステップ2/3]ダイアログボックスを開いて、データを分割するために必要な区切り文字を確認してください。

Note:テキスト文字列を特別な区切り文字で分割する必要がある場合は、 その他 オプションを選択し、次のボックスに区切り文字を入力します。

4。 クリック 終了。 これで、選択した列リストが、指定した区切り文字によって複数の列に分割されていることがわかります。

XNUMXつのセル/列から異なる列/行にのみ数値(またはテキスト)を抽出します

Kutools forExcelはその機能を強化します 分割セル ユーティリティとサポートは、XNUMXつのセル/列からXNUMXつの列/行にすべてのテキスト文字または数字をバッチ抽出します。



Kutools for Excel - 300 以上の必須ツールで Excel を強化します。 クレジット カードは必要なく、全機能を備えた 30 日間の無料トライアルをお楽しみください。 今すぐ入手

Kutools for Excelを使用して、スペース/カンマ/区切り文字でテキスト文字列を複数の行/列に分割します

上記の方法では、テキスト文字列を複数の列に分割することしかできません。 このメソッドは、Excel用のKutoolsを導入します 分割セル Excelで指定された区切り文字によってテキスト文字列を複数の行または列に簡単に分割するユーティリティ。

Kutools for Excel - Excel に必要な 300 以上のツールが詰め込まれています。 クレジット カードは必要なく、全機能を備えた 30 日間の無料トライアルをお楽しみください。 ダウンロード中!

1.テキスト文字列を分割する範囲を選択し(この場合は範囲​​A1:A9を選択します)、をクリックします。 クツール > テキスト > 分割セル.
ドキュメント分割テキスト01

2. [セルの分割]ダイアログボックスを開いて、[ 行に分割 オプションまたは 列に分割 必要に応じてオプション セクションで、次に区切り文字を指定します 区切り文字を指定します セクションを開き、 Ok ボタン。 上記のスクリーンショットを参照してください。

別の[セルの分割]ダイアログボックスが表示されます。宛先範囲の最初のセルを選択して、 OK
docはテキストを行列に分割します10

Kutools for Excel - 300 以上の必須ツールで Excel を強化します。 クレジット カードは必要なく、全機能を備えた 30 日間の無料トライアルをお楽しみください。 今すぐ入手


デモ:テキスト文字列をスペース/カンマ/区切り文字で複数の行/列に分割します


Kutools for Excel: 300 を超える便利なツールをすぐに利用できます。 機能制限なしの 30 日間の無料トライアルを今すぐ始めてください。 今すぐダウンロード!


関連記事:

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 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