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

セルにExcelのいくつかの値のXNUMXつが含まれているかどうかを確認するにはどうすればよいですか?

列Aにテキスト文字列のリストがあるとします。ここで、別の範囲D2:D7に基づくいくつかの値の2つが含まれているかどうか、各セルをテストします。 D7:DXNUMXの特定のテキストのいずれかが含まれている場合は、Trueと表示されます。含まれていない場合は、次のスクリーンショットのようにFalseと表示されます。 この記事では、セルに別の範囲のいくつかの値のXNUMXつが含まれている場合にセルを識別する方法について説明します。


セルに数式を含むリストのいくつかの値のXNUMXつが含まれているかどうかを確認します

セルの内容に別の範囲のテキスト値のいずれかが含まれているかどうかを確認するには、次の数式が役立ちます。次のようにしてください。

結果を検索する空白のセル(たとえば、B2)に次の数式を入力し、この数式を適用するセルまで塗りつぶしハンドルを下にドラッグします。セルに別のテキスト値がある場合は、特定の範囲の場合はTrueになり、そうでない場合はFalseになります。 スクリーンショットを参照してください:

=SUMPRODUCT(--ISNUMBER(SEARCH($D$2:$D$7,A2)))>0

ヒント:

1.「はい」または「いいえ」を使用して結果を示したい場合は、次の式を適用してください。必要に応じて次の結果が得られます。スクリーンショットを参照してください。

=IF(SUMPRODUCT(--ISNUMBER(SEARCH($D$2:$D$6,A2))),"Yes","No")

2.上記の式では、 D2:D7 に基づいてセルをチェックする特定のデータ範囲であり、 A2 チェックしたいセルです。


セルに数式を含むリストのいくつかの値のXNUMXつが含まれている場合は、一致を表示します

セルにリスト内の値が含まれているかどうかを確認してからその値を返す場合があります。複数の値が一致する場合は、リスト内の一致するすべての値が次のスクリーンショットに表示されます。Excelでこのタスクを解決するにはどうすればよいですか。

セルに特定のテキストのいずれかが含まれている場合に一致するすべての値を表示するには、次の数式を適用してください。

=TEXTJOIN(", ", TRUE, IF(COUNTIF(A2, "*"&$D$2:$D$7&"*"), $D$2:$D$7, ""))

Note:上記の式では、 D2:D7 に基づいてセルをチェックする特定のデータ範囲であり、 A2 チェックしたいセルです。

その後、プレス Ctrl + Shift + Enter キーを合わせて最初の結果を取得し、塗りつぶしハンドルをこの数式を適用するセルまでドラッグします。スクリーンショットを参照してください。

ヒント:

上記のTEXTJOIN関数は、Excel2019およびOffice365でのみ使用できます。以前のバージョンのExcelを使用している場合は、次の式を適用する必要があります。

=IFERROR(INDEX($D$2:$D$7, SMALL(IF(COUNTIF($A2, "*"&$D$2:$D$7&"*"), MATCH(ROW($D$2:$D$7), ROW($D$2:$D$7)), ""), COLUMNS($F$1:F1))), "")

Note:上記の式では、 D2:D7 に基づいてセルをチェックする特定のデータ範囲であり、 A2 チェックしたいセルです。

その後、プレス Ctrl + Shift + Enter 一緒にキーを押して最初の結果を取得し、空白のセルが表示されるまで数式セルを右側にドラッグしてから、塗りつぶしハンドルを他のセルにドラッグすると、一致するすべての値が次のスクリーンショットのように表示されます。


セルに便利な機能を備えたリストのいくつかの値のXNUMXつが含まれている場合は、一致を強調表示します

セルに別のリストのいくつかの値のXNUMXつが含まれている場合に、一致する値の特定のフォントの色を強調表示する場合は、このセクションで簡単な機能を紹介します。 キーワードをマーク of Kutools for Excel、このユーティリティを使用すると、セル内の特定のXNUMXつ以上のキーワードを一度に強調表示できます。

注:これらを適用するには キーワードをマーク 機能、まず、ダウンロードする必要があります Kutools for Excel、次に機能をすばやく簡単に適用します。

インストールした後 Kutools for Excel、次のようにしてください。

1に設定します。 OK をクリックします。 クツール > テキスト > キーワードをマーク、スクリーンショットを参照してください:

2。 の中に キーワードをマーク ダイアログボックスで、次の操作を行ってください。

  • 一致するテキストを強調表示するデータ範囲を レンジ テキストボックス;
  • 強調表示するキーワードが含まれているセルを選択します。キーワードを手動で(カンマで区切って)入力することもできます。 キーワード テキストボックス
  • 最後に、チェックしてテキストを強調表示するためのフォントの色を指定する必要があります キーワードの色をマークする オプションを選択します。 

3。 次に、をクリックします。 Ok ボタンをクリックすると、一致するすべてのテキストが次のスクリーンショットのように強調表示されます。


より相対的な記事:

  • ExcelでXNUMXつ以上のテキスト文字列を比較する
  • 次のスクリーンショットに示すように、ワークシート内のXNUMXつ以上のテキスト文字列を大文字と小文字を区別するか大文字と小文字を区別しないかで比較する場合は、この記事で、Excelでこのタスクを処理するための便利な数式について説明します。
  • セルにテキストが含まれている場合はExcelで表示
  • 列Aにテキスト文字列のリストがあり、キーワードの行がある場合は、キーワードがテキスト文字列に表示されているかどうかを確認する必要があります。 キーワードがセルに表示されている場合は表示され、表示されていない場合は、次のスクリーンショットのように空白のセルが表示されます。
  • Excelで複数の値を見つけて置き換える
  • 通常、検索と置換機能は、特定のテキストを検索して別のテキストに置き換えるのに役立ちますが、場合によっては、複数の値を同時に検索して置換する必要があります。 たとえば、以下のスクリーンショットに示すように、すべての「Excel」テキストを「Excel 2019」に、「Outlook」を「Outlook2019」に置き換えるなどです。 この記事では、Excelでこのタスクを解決するための式を紹介します。

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

🤖 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 (56)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello,

I have spreadsheet that have some cell with following test $5655 (BIT001), $4445 (BIT002). I would like to extract every BITxxx and display in another cell with BIT001, BIT002. I'm using MID and FIND but it work only with one BIT001 and BIT002 seems to not search. How would you do it guys?
This comment was minimized by the moderator on the site
You can use text to column > Deliminate > ("("), - I will spit the text from Open Bracket .. like BIT001), then you can remove the closing bracket with a find and replace option.
This comment was minimized by the moderator on the site
Hi all,

Any suggestions...

I have a VALUE next to the SPECIFIC TEXT column F. I need a RESULT in Column B with the VALUE next to SPECIFIC TEXT.
This comment was minimized by the moderator on the site
In option "Display the matches if cell contains one of several values from a list with formulas" I'm having issues in "Result" when the "Specific Text" values is similar to others.

For example, if I have in "Specific Text" the values 'remove' and 'remove lines', I need to get in "Result" the correct value.

Thanks
This comment was minimized by the moderator on the site
I find an option in other webpage:

=TEXTJOIN(" ",1,IF(ISNUMBER(FIND(" "&$F$2:$F$6&" "," "&B2&" ")),$F$2:$F$6,""))
This comment was minimized by the moderator on the site
In the option "Display the matches if cell contains one of several values from a list with formulas" I'm having issues if the word to search is similar to other word. For example if in "Specif text" I have: Remove and Remove line, I need to get/recognise in "Result" the different values ("Remove" for 1 line and "Remove line" in other line). The problem is that always I'm getting "Remove"
This comment was minimized by the moderator on the site
Bonjour, j'essaye cette formule sur une très grande liste de mot et la recherche fait un contient, mais pas au mot entier.
Vous avez une solution ?

Par exemple, le mot de ma liste à rechercher est "aire". Cependant, le mot "horaire" m'indique vrai... avec la formule.
Alors oui "horaire" contient "aire" mais pas en mot entier...

Autre exemple : le mot de ma liste à rechercher est "ri". Cependant, le mot "clé dynamométrique" m'indique vrai...

Merci
This comment was minimized by the moderator on the site
Hello, Greg,
Sorry, I can't understand you clearly.
Could you explain your problem in English? Or you can upload a file or screenshot of your problem here.
Thank you!
This comment was minimized by the moderator on the site
=IF(SUMPRODUCT(--ISNUMBER(SEARCH($D$2:$D$6,A2))),"Yes","No")

Is there a way of amending the formula to return the number of words appear in the text examined?

e.g. returned answer is not whether one of three words (a given list) are found, but if 1, 2, or 3 words are found.

Hope this makes sense................

Thanks



Alan
This comment was minimized by the moderator on the site
Hello, Alan,
To solve your problem, the following array formula may help you: (Note: After inserting the formula, press Ctrl + Shift + Enter keys together to get the first result.)
=SUM((LEN(A2)-LEN(SUBSTITUTE(A2,$D$2:$D$5,"")))/LEN($D$2:$D$5))


Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
help someone. I have a spreadsheet that has example below. I need a formula that will search and return the following based on what is in the cell

A-05-002F: Air Conditioning Unit or Heat Pump Split System - Qtrly Filter
A-11-025: Air Handler Unit - Annual
E-42-001: Emergency Generators - Weekly #4

The above is in C2 I want E2 to display Q if cell contains Qtrly, A if cell contains Annual, W if cell contains weekly
This comment was minimized by the moderator on the site
Hi, Lynda,
To solve your problem, please apply the following formula:
=IF(ISERROR(SEARCH("Qtrly",C2)),IF(ISERROR(SEARCH("Annual",C2)),IF(ISERROR(SEARCH("weekly",C2)),"","W"),"A"), "Q")

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Correction the above information is in C2 C3 C4
This comment was minimized by the moderator on the site
RE: above example  =IFERROR(INDEX($D$2:$D$7, SMALL(IF(COUNTIF($A2, "*"&$D$2:$D$7&"*"), MATCH(ROW($D$2:$D$7), ROW($D$2:$D$7)), ""), COLUMNS($F$1:F1))), "")I keep error with Excel 2010.  Same with example for Excel 2019, in Excel 2019 on a different PC. Tried the one  Is it Wish it was available in my Kutools  
This comment was minimized by the moderator on the site
Multiple search value in a single cell, and return as a Common Value
This comment was minimized by the moderator on the site
Is it possible to do this with a partial match of the keywords? This method is only an exact match
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