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

Excelの基準に基づいて一意の値を抽出するにはどうすればよいですか?

以下のスクリーンショットのような結果を得るために、列Aの特定の基準に基づいて列Bの一意の名前のみをリストする左側のデータ範囲があるとします。 Excelでこのタスクをすばやく簡単に処理するにはどうすればよいですか?

配列数式を使用して基準に基づいて一意の値を抽出します

配列数式を使用して、複数の基準に基づいて一意の値を抽出します

便利な機能を備えたセルのリストから一意の値を抽出します

 

配列数式を使用して基準に基づいて一意の値を抽出します

このジョブを解決するには、複雑な配列数式を適用できます。次のようにしてください。

1。 抽出結果を一覧表示する空白のセルに次の数式を入力します。この例では、セルE2に入力して、を押します。 Shift + Ctrl + Enter 最初の一意の値を取得するためのキー。

=IFERROR(INDEX($B$2:$B$15, MATCH(0, IF($D$2=$A$2:$A$15, COUNTIF($E$1:$E1, $B$2:$B$15), ""), 0)),"")

2。 次に、空白のセルが表示されるまで塗りつぶしハンドルをセルまでドラッグします。これで、特定の基準に基づくすべての一意の値が一覧表示されます。スクリーンショットを参照してください。

注: 上記の式では: B2:B15 列範囲には、抽出する一意の値が含まれています。 A2:A15 列には、あなたが基づいた基準が含まれています、 D2 に基づいて一意の値を一覧表示する基準を示し、および E1 入力した数式の上のセルです。

配列数式を使用して、複数の基準に基づいて一意の値を抽出します

XNUMXつの条件に基づいて一意の値を抽出する場合は、次の配列数式を使用すると便利です。次のようにしてください。

1。 一意の値を一覧表示する空白のセルに次の数式を入力します。この例では、セルG2に入力して、を押します。 Shift + Ctrl + Enter 最初の一意の値を取得するためのキー。

=IFERROR(INDEX($C$2:$C$15,MATCH(0,COUNTIF(G1:$G$1,$C$2:$C$15)+IF($A$2:$A$15<>$E$2,1,0)+IF($B$2:$B$15<>$F$2,1,0),0)),"")

2。 次に、空白のセルが表示されるまで塗りつぶしハンドルをセルまでドラッグします。これで、特定のXNUMXつの条件に基づくすべての一意の値が一覧表示されます。スクリーンショットを参照してください。

注: 上記の式では: C2:C15 列範囲には、抽出する一意の値が含まれています。 A2:A15 & E2 に基づいて一意の値を抽出する基準を持つ最初の範囲です。 B2:B15 & F2 は、に基づいて一意の値を抽出する基準を持つXNUMX番目の範囲です。 G1 入力した数式の上のセルです。

便利な機能を備えたセルのリストから一意の値を抽出します

セルのリストから一意の値を抽出したい場合があります。ここでは、便利なツールをお勧めします-Kutools for Excelそのと 一意の値を持つセルを抽出します(最初の重複を含む) ユーティリティを使用すると、一意の値をすばやく抽出できます。

注:これを適用する 一意の値を持つセルを抽出します(最初の重複を含む)、まず、ダウンロードする必要があります Kutools for Excel、次に機能をすばやく簡単に適用します。

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

1。 結果を出力するセルをクリックします。 ((Note:最初の行のセルをクリックしないでください。)

2。 次に、をクリックします クツール > フォーミュラヘルパー > フォーミュラヘルパー、スクリーンショットを参照してください:

3。 の中に 数式ヘルパー ダイアログボックスで、次の操作を行ってください。

  • 選択 テキスト オプションから    ドロップダウンリスト;
  • それから、 一意の値を持つセルを抽出します(最初の重複を含む) fromulaを選択してください リストボックス;
  • 右にあります 引数入力 セクションで、一意の値を抽出するセルのリストを選択します。

4。 次に、をクリックします Ok ボタンをクリックすると、最初の結果がセルに表示されます。次に、セルを選択し、空白のセルが表示されるまで、すべての一意の値を一覧表示するセルに塗りつぶしハンドルをドラッグします。スクリーンショットを参照してください。

今すぐExcel用のKutoolsを無料でダウンロードしてください!


より相対的な記事:

  • リストから一意で異なる値の数を数える
  • 重複するアイテムを含む値の長いリストがあるとします。次に、一意の値(リストに1回だけ表示される値)または個別の値(リスト内のすべての異なる値、つまり一意を意味する)の数をカウントします左のスクリーンショットが示すように、列内の値+ XNUMX番目の重複値)。 この記事では、Excelでこのジョブを処理する方法について説明します。
  • Excelの基準に基づいて一意の値を合計する
  • たとえば、次のスクリーンショットに示すように、[名前]列に基づいて[注文]列の一意の値のみを合計するために、[名前]列と[注文]列を含むデータの範囲があります。 このタスクをExcelですばやく簡単に解決するにはどうすればよいですか?
  • Excelで一意の値を連結する
  • 重複データが入力された値の長いリストがある場合は、一意の値のみを検索して、それらをXNUMXつのセルに連結します。 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 (40)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you so much. This was very very helpful. You Rock!!
This comment was minimized by the moderator on the site
hi everyone..
i have problem..
i got blank result even i press ctrl shift enter together..
This comment was minimized by the moderator on the site
Hi all, Can some help me to get all unique values on one single cell
This comment was minimized by the moderator on the site
Hi, this worked well! Although it takes Excel sooooo long to calculate. Just dragging down 15 cells in a column takes about 15min to calculate... if not longer. Is this normal? If this becomes dynamic it will take a hell of alot of computing time.
This comment was minimized by the moderator on the site
Hello. This is really helpful, however, what If I want a formula that lists the unique values based on multiple criteria. eg. I have a data set which has the following data in a table (after each hyphen is a new column but same row):

Company A - £200 - £100
Company A - £300 - £200
Company B - £300 - £200
Company C - £600 - £200
Company B - £100 - £300
Company D - £0 - £600
Company A - £700 - £100

I want a new data table in a new tab which groups the duplicate values without using an array formula. currently I'm grouping using a pivot table and pasting to my new data table. It's a long process but array formulas make my spreadsheet really slow.

Company A - £1200 - £400
Company B - £400 - £500
Company C - £600 - £200
Company D - £0 - £600

Thanks,
K
This comment was minimized by the moderator on the site
Hello, K,
For solving your problem, I can recommend our useful tool- Kutools for Excel, with its Advanced Combine Rows feature, you can deal with this job quickly. Firstly, you should copy and paste your data into a new worksheet, and then apply htis feature as below screenhsot shown.
You can know more about this feature from: https://www.extendoffice.com/product/kutools-for-excel/excel-combine-duplicate-rows.html
Please download Kutools for Excel and install it, then apply this feature. Full feature free trial 30-day, please try.
This comment was minimized by the moderator on the site
Hi! the formula works really well. I would like to add another criterion, i mean, get the unique answers but using two criteria
This comment was minimized by the moderator on the site
Hi, Giancarlo,
to extract unique values based on multiple criteria, any of the below formula can help you: (after pasting the formula, please press Ctrl + Shift + Enter keys together.)
=IFERROR(INDEX($C$2:$C$11, MATCH(0, COUNTIF(G1:$G$1, $C$2:$C$11)+IF($A$2:$A$11<>$E$2, 1, 0)+IF($B$2:$B$11<>$F$2, 1, 0), 0)), "")
=INDEX($C$2:$C$11, MATCH(0, IF(($A$2:$A$11=$E$2)*($B$2:$B$11=$F$2), COUNTIF($G$1:$G1, $C$2:$C$11), ""), 0))
Please try, hope it can help you!
This comment was minimized by the moderator on the site
Hi. I am using the two conditions formula =IFERROR(INDEX($C$2:$C$11, MATCH(0, COUNTIF(G1:$G$1, $C$2:$C$11)+IF($A$2:$A$11<>$E$2, 1, 0)+IF($B$2:$B$11<>$F$2, 1, 0), 0)), "") to extract a unique list and it works great, but I am struggle to add the SMALL function to get the list sorted as well in ascending order. Are you able to help?
This comment was minimized by the moderator on the site
Is there a way to make this work while ALLOWING for duplicate values? For instance, I want all instances of Lucy to be listed in the results.
This comment was minimized by the moderator on the site
Hello, Konstantin,
To extract all corresponding values including the duplicates based on a specific cell criteria, the following array formula can help you, see screenshot:
=IF(ISERROR(INDEX($A$1:$B$17,SMALL(IF($A$1:$A$17=$D$2,ROW($A$1:$A$17)),ROW(1:1)),2)),"",
INDEX($A$1:$B$17,SMALL(IF($A$1:$A$17=$D$2,ROW($A$1:$A$17)),ROW(1:1)),2))

After inserting the formula, please press Shift + Ctrl + Enter keys together to get the correct result, and then drag the fill handle down to get all values.
Hope this can help you, thank you!
This comment was minimized by the moderator on the site
This has worked great for me with a specific lookup value. However, if I wanted to use a wildcard to look up partial values, how would I do that? For example, if I wanted to lookup all the names associated with KT?

I am using this function to look up cells that contain multiple text. For example if each product also had a sub-product within the same cell but I was only looking for names associated with the sub-product "elf".

KTE - elf
KTE- ball
KTE - piano
KTO - elf
KTO- ball
KTO - piano
This comment was minimized by the moderator on the site
For me the formula does not work. I press ctrl shift enter and i still get an error N/A. I would like to add that i prpared exaclty the same data as in tutorial. What is the reason it does not work?
This comment was minimized by the moderator on the site
How would I get this formula to return each of the duplicates instead of one of each of the names? For instance, in the example above, how would I get the results column (B:B) to return Lucy, Ruby, Anny, Jose, Lucy, Anny, Tom? I'm using this as a budget tool pulling to specific account summaries from a general ledger. However, several of the amounts and transaction descriptions are duplicates in the general ledger. Once the first of the duplicated values is pulled, no more of them get pulled.
This comment was minimized by the moderator on the site
Hi, Joe,
To extract all corresponding values based on a specific cell criteria, the following array formula can help you, see screenshot:
=IF(ISERROR(INDEX($A$1:$B$17,SMALL(IF($A$1:$A$17=$D$2,ROW($A$1:$A$17)),ROW(1:1)),2)),"",
INDEX($A$1:$B$17,SMALL(IF($A$1:$A$17=$D$2,ROW($A$1:$A$17)),ROW(1:1)),2))

After inserting the formula, please press Shift + Ctrl + Enter keys together to get the correct result, and then drag the fill handle down to get all values.
Hope this can help you, thank you!
This comment was minimized by the moderator on the site
Last Question: If I want the results column to return all values not associated with KTE or KTO (so, D:D would be Tom, Nocol, Lily, Angelina, Genna), how would I do that?
This comment was minimized by the moderator on the site
Ok, so it works in the master workbook. There is one exception that I haven't been able to determine the cause of: If the array (in my case, the general ledger that I had beginning in row 3) does not begin in Row 1, the returned values are incorrect. What causes this problem, and which term in the formula fixes it? Thanks again for your help with this!
This comment was minimized by the moderator on the site
So far so good. I'm able to duplicate the results in the test sheet, make changes to the array, and then correct the formula to account for the changes I've made. I plan to move this into the master sheet today and see how it works. Thanks for the help!
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