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

ExcelでXNUMXつのリストの値を別のリストから除外するにはどうすればよいですか?

左のスクリーンショットに示すように、XNUMXつのデータリストがあるとします。 列Dに名前が存在する場合は、列Aの名前を削除または除外する必要があります。これを実現するにはどうすればよいですか。 そして、XNUMXつのリストがXNUMXつの異なるワークシートにある場合はどうなりますか? この記事では、XNUMXつの方法を紹介します。

式を使用して、あるリストの値を別のリストから除外する

Kutools for Excelを使用して、あるリストの値を別のリストからすばやく除外する


式を使用して、あるリストの値を別のリストから除外する

次の式を適用して、それを実現できます。 次のようにしてください。

1.削除するリストの最初のセルに隣接する空白のセルを選択し、数式を入力します = COUNTIF($ D $ 2:$ D $ 6、A2) 数式バーに入力し、を押します 入力します キー。 スクリーンショットを参照してください:

Note:数式では、$ D $ 2:$ D $ 6は値を削除するリストであり、A2は削除するリストの最初のセルです。 必要に応じて変更してください。

2.結果セルを選択し続け、リストの最後のセルに到達するまでフィルハンドルを下にドラッグします。 スクリーンショットを参照してください:

3.結果リストを選択し続け、をクリックします 且つ > ZをZにソートする.

次に、リストが次のスクリーンショットのように並べ替えられていることがわかります。

4.結果1の名前の行全体を選択し、選択した範囲を右クリックして、 削除 それらを取り除く。

これで、あるリストの値を別のリストに基づいて除外しました。

Note:Sheet2などの別のワークシートの範囲A6:A2にある「削除リスト」の場合は、この式を適用してください。 = IF(ISERROR(VLOOKUP(A2、Sheet2!$ A $ 2:$ A $ 6,1、FALSE))、 "Keep"、 "Delete") すべてを取得するには キープ & 削除 結果、Ato Zから結果リストを並べ替えてから、現在のワークシートの結果の削除を含むすべての名前行を手動で削除します。


Kutools for Excelを使用して、あるリストの値を別のリストからすばやく除外する

このセクションでは、 同じセルと異なるセルを選択する の有用性 Kutools for Excel この問題を解決するために。 次のようにしてください。

申請する前に Kutools for Excelについては 最初にダウンロードしてインストールします.

1。 クリック クツール > 選択 > 同じセルと異なるセルを選択する。 スクリーンショットを参照してください:

2。 の中に 同じセルと異なるセルを選択する ダイアログボックスでは、次のことを行う必要があります。

  • 2.1値を削除するリストを選択します で値を検索 ボックス;
  • 2.2値を削除するリストを選択します による ボックス;
  • 2.3を選択します 単細胞 内のオプション に基づく セクション;
  • 2.4 OK ボタン。 スクリーンショットを参照してください:

3.次に、選択されたセルの数を示すダイアログボックスが表示されます。をクリックしてください。 OK

4.列Dに存在する場合は、列Aの値が選択されます。を押すと、 削除 それらを手動で削除するためのキー。

  このユーティリティの無料トライアル(30日)が必要な場合は、 クリックしてダウンロードしてください、次に、上記の手順に従って操作を適用します。


Kutools for 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 (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
"foruma contains an error!"
Wondeful help...
This comment was minimized by the moderator on the site
the function is correct: maybe you have Excel in a different language than english. Change the function names in that way. :)
This comment was minimized by the moderator on the site
Thank you for this. It solved my problem of wanting to include only companies from a list
This comment was minimized by the moderator on the site
This formula subtracts list in column B from list in columnA:=FILTER(IFNA(MATCH(A2:A12,B2:B6,0),A2:A12),ISNUMBER(IFNA(MATCH(A2:A12,B2:B6,0),A2:A12))=FALSE)
This comment was minimized by the moderator on the site
But this one's simpler (Subtracts list in A2:A20 from list in D2:D6):=FILTER(A2:A20,ISERROR(MATCH(A2:A20,D2:D6,0))=TRUE)
This comment was minimized by the moderator on the site
Keith,

This formula was incredibly helpful (even more helpful than the actual blog post!) You're a life saver! This formula gets really powerful if you use it in dynamic arrays.
This comment was minimized by the moderator on the site
what if I have multiple columns?
This comment was minimized by the moderator on the site
Depends on the structure of your lists, but if you want to exclude several lists Y and Z from a single big list X, try something like this:
=FILTER(X3:X21,ISERROR(MATCH(X3:X21,Y3:Y6,0))*ISERROR(MATCH(X3:X21,Z3:Z5,0))=1)
this returns listX minus listY and listZ.
The "ISERROR(MATCH(X3:X21,Y3:Y6,0))" returns "TRUE" if an item in listX is missing from listY, likewise ISERROR(MATCH(X3:X21,Z3:Z5,0)) for listX and listZ.
A quirk of Excel is that "=TRUE*TRUE" will return "1". In fact, any number of TRUEs multiplied will return "1", but include a single FALSE and it will return "0".
So the FILTER will return only those items from the list where all the "ISERROR(MATCH....." formulae are TRUE.
For each additional list of items to exclude, add an extra *ISERROR(MATCH(listX,list_exclude,0)) before the "=1)"
This comment was minimized by the moderator on the site
You could try a filter of a filter:=FILTER(A2:A20,ISERROR(MATCH(A2:A20,FILTER(Array2,Include_criteria2)))=TRUE)
This comment was minimized by the moderator on the site
Apologies, that should read "Subtracts list in D2:D6 from list in A2:A20."
This comment was minimized by the moderator on the site
Apologies, that should read "Subtracts list in D2:D6 from list in A2:A20."
This comment was minimized by the moderator on the site
Apologies, that should read "Subtracts list in D2:D6 from list in A2:A20"
This comment was minimized by the moderator on the site
Good find. Thank you for this clever workaround. I thought was only possible via macros.
Possible to do the same using method 1, for a range consisting in two columns. i.e City, State in col D2:E20 while my A2:C1000 (B:C has city,state) has the set I need to get marked?
tried this did not work: =COUNTIF($D$2:$E$20,B2:C2). Unless you have another wonderful guide.
This comment was minimized by the moderator on the site
Как безграмотный человек писал эту статью? Тот, кто русский язык не учил, ни одной книги не прочел и не общался в социуме никогда? Уже с самого начала статьи обороты почти в каждом предложении такие, что на голову не натянешь. Зачем писать, если не умеешь писать?
This comment was minimized by the moderator on the site
I receive other values in the COUNTIF column like 2 but also higher numbers other than 0 and 1. What does that mean?
This comment was minimized by the moderator on the site
The values you get in the COUNTIF column are equal to the number of occurrences of the element in the right column. For example, if you have 5 displayed against a cell in the Name column, it means that this name was found in the To-remove-list not one, but five times.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations