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

Excelのキーワードに基づいてテキスト文字列を分類するにはどうすればよいですか?

著者:シャオヤン 最終更新日:2021年11月26日

列Aにテキスト文字列のリストがあるとすると、列Dのキーワードに基づいて列Aのテキスト文字列を分類します。たとえば、Kutoolsを含むすべてのセルを次のように分類します。 Extendoffice、次のスクリーンショットに示すように、サッカー、バスケットボールなどを含むセルをスポーツに割り当てます。 この複雑なジョブをExcelですばやく簡単に完了するにはどうすればよいですか?

配列数式を使用してキーワードに基づいてテキスト文字列のリストを分類します


オフィスタブ写真

レイオフシーズンが近づいていますが、まだゆっくりと働いていますか?
-- Office Tab ペースを上げ、作業時間を50%節約します!

  •  すごい! 複数のドキュメントの操作は、単一のドキュメントよりもさらにリラックスして便利です。
  •  他のWebブラウザーと比較して、Officeタブのインターフェイスはより強力で美的です。
  •  何千もの面倒なマウスクリックを減らし、頸椎症とマウスの手に別れを告げます。
  •  90,000人のエリートと300以上の有名企業に選ばれます!
フル機能、30日間の無料トライアル          続きを読む             今すぐダウンロード!
 

配列数式を使用してキーワードに基づいてテキスト文字列のリストを分類します

いくつかのキーワードに基づいてテキスト文字列を分類するには、次の配列数式を適用できます。

1。 まず、必要に応じてデータを分類する必要があります。 たとえば、次のスクリーンショットに示すようにデータを分類します。

2。 次の数式を空白のセルに入力またはコピーしてください。

=INDEX($E$2:$E$8,MATCH(TRUE,ISNUMBER(SEARCH($D$2:$D$8,A2)),0))
  • ヒント:この式では:
  • $ E $ 2:$ E $ 8:は、テキスト文字列に割り当てるカテゴリです。
  • $ D $ 2:$ D $ 8:に基づいて分類する特定のテキストです。
  • A2:セルには、分類するテキスト文字列が含まれています。

3。 そして、 Ctrl + Shift + Enter キーを一緒に押すと、最初の結果が得られます。次に、この数式を適用するセルまで塗りつぶしハンドルをドラッグすると、すべてのテキスト文字列が必要に応じて特定のグループとして分類されます。 スクリーンショットを参照してください:


サンプルファイルをダウンロードする

クリックしてサンプルファイルをダウンロードしてください!


より相対的なテキストカテゴリの記事:

  • Excelの値に基づいてデータを分類する
  • データのリストを値に基づいて分類する必要があるとします。たとえば、データが90より大きい場合は高に分類され、60より大きく90未満の場合は中に分類されます。低に分類される60未満の場合、Excelでこのタスクをどのように解決できますか?
  • 数値範囲に基づいて値またはカテゴリを割り当てる
  • この記事では、Excelで指定された範囲に関連する値またはカテゴリを割り当てる方法について説明します。 たとえば、指定された数値が0から100の場合、値5を割り当て、101から500の場合、10を割り当て、範囲501から1000の場合、15を割り当てます。この記事の方法は、それを乗り越えるのに役立ちます。
  • Excelで文字の成績を計算または割り当てる
  • スコアに基づいて各生徒に文字の成績を割り当てることは、教師にとって一般的な作業である可能性があります。 たとえば、次のスクリーンショットに示すように、スコア0-59 = F、60-69 = D、70-79 = C、80-89 = B、および90-100 = Aの評価尺度が定義されています。 Excelで、数値スコアに基づいて文字の成績をすばやく簡単に計算するにはどうすればよいですか?
  • シリアル番号を重複または一意の値に割り当てる
  • いくつかの重複を含む値のリストがある場合、重複または一意の値に連番を割り当てることは可能ですか? これは、重複する値または一意の値を順番に並べることを意味します。 この記事では、Excelでこのタスクを解決するのに役立ついくつかの簡単な数式について説明します。

  • スーパーフォーミュラバー (複数行のテキストと数式を簡単に編集できます); 読書レイアウト (多数のセルを簡単に読み取って編集する); フィルター範囲に貼り付け...
  • セル/行/列をマージする およびデータの保持。 分割セルコンテンツ; 重複する行と合計/平均を組み合わせる...重複セルを防止します。 範囲を比較する...
  • [複製]または[一意]を選択します 行; 空白行を選択 (すべてのセルは空です); スーパーファインドとファジーファインド 多くのワークブックで; ランダム選択...
  • 正確なコピー 数式参照を変更せずに複数のセル。 参照の自動作成 複数のシートに; 箇条書きを挿入、チェックボックスなど...
  • お気に入りの数式をすばやく挿入する、範囲、チャート、写真; セルを暗号化する パスワード付き。 メーリングリストを作成する そしてメールを送る...
  • テキストを抽出、テキストの追加、位置による削除、 スペースを削除する; ページング小計の作成と印刷。 セルの内容とコメントを変換する...
  • スーパーフィルター (フィルタースキームを保存して他のシートに適用します); 高度な並べ替え 月/週/日、頻度など。 特殊フィルター 太字、斜体...
  • ワークブックとワークシートを組み合わせる; キー列に基づいてテーブルをマージします。 データを複数のシートに分割; xls、xlsx、PDFをバッチ変換...
  • ピボットテーブルのグループ化 週番号、曜日など... ロック解除された、ロックされたセルを表示する さまざまな色で; 式/名前を持つセルを強調表示する...
kteタブ201905
  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
officetab下部
Comments (10)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Thanks for the tips of index how to use, But I have a extend question:
If I wanna sort like "aaaaa" to "row B" & "row C",
gonna be "3a" & "2a" (or"2a" & "3a")
So I use the function "=INDEX(E3:E4,MATCH(TRUE,ISNUMBER(SEARCH(D3:D4,A3)),0))"
(D3 is "aaa", E3 is "3a"; D3 is "aa", D4 is "2a")
The result is "3a" & "3a" in "row B" & "row C"...
Could you make some solutions to this problem? I am so appreciate it.
Rated 5 out of 5
This comment was minimized by the moderator on the site
Is there a way to have a multi word keyword?
Ex: I'm trying to sort out the rows that have "patient ID". However, my keyword "patient id" pulls every row with "patient."
This comment was minimized by the moderator on the site
I have a doubt.I have the data in Sheet 1 ,I want to create the category table in sheet 2 and want the categorized date to be entered in sheet 3. How may i do that
This comment was minimized by the moderator on the site
Hello, Gokul Prakash
Could you give more detailed information of your probelm?
Or you can insert an attachment file or screenshot here to explain your task.
Thank you!
This comment was minimized by the moderator on the site
Doesn't work for me either. I only get "problem with formular". I rebuild your Excel and it also doesn't work there. I don't know if the Problem is "Ctrl + Shift + Enter" i tried everything but nothing works, is there a go around for the key combination?
could you maybe up load your example.

thank you very much
This comment was minimized by the moderator on the site
Hi, Rocket,I have uploaded the attachment file at the end of this article, please download to view.If you have any other problem, please comment here, thank you!
This comment was minimized by the moderator on the site
Doesn't work for me either. I only get "problem with formular". I rebuild your Excel and it also doesn't work there. I don't know if the Problem is "Ctrl + Shift + Enter" i tried everything but nothing works, is there a go around for the key combination?could you maybe up load your example.
hank you very much
This comment was minimized by the moderator on the site
This doesn't work for me. Is it because the keyword may be within the string of text, and not the beginning key word? 
This comment was minimized by the moderator on the site
Hi, Taren,The formula also works well if the keyword is in the middle of the text string, do you remember to press the Ctrl + Shift + Enter keys together after you insert the formula?Please check it, thank you!
This comment was minimized by the moderator on the site
How can you make it such that the match/index references are updated automatically? If I refer to entire column instead of only the cells that contain the values I get a zero as result
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations