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

Excelで範囲内の重複する行を見つけて強調表示する方法は?

ワークシートのデータ範囲に重複するレコードがある場合があります。次に、次のスクリーンショットのように、範囲内の重複する行を検索または強調表示する必要があります。 もちろん、行をチェックすることで次々に見つけることができます。 ただし、行が数百行ある場合、これは適切な選択ではありません。 ここでは、このタスクに対処するためのいくつかの便利な方法について説明します。

 

数式を使用して複数の列にまたがる重複行を検索する

条件付き書式を使用して、複数の列にまたがる重複行を強調表示します

便利な機能を使用して、複数の列にまたがる重複行を選択または強調表示します


数式を使用して複数の列にまたがる重複行を検索する

次の式は、重複するレコードを見つけるのに役立ちます。次のようにしてください。

1。 隣接する空白のセル(この場合はセルD2)に、次の数式を入力してください。

=IF(COUNTIFS($A$2:$A$12,$A2,$B$2:$B$12,$B2,$C$2:$C$12,$C2)>1, "Duplicate row", "")

2。 次に、塗りつぶしハンドルをセルまでドラッグしてこの数式を適用します。これで、この使用範囲に同じ行がある場合は、次のように表示されます。 行が重複しています、スクリーンショットを参照してください:

  • 注意:
  • 1.式では、 $ A $ 2:$ A $ 12, $ B $ 2:$ B $ 12, $ C $ 2:$ C $ 12 重複を検索する範囲列を指定します。 必要に応じて変更できます。 そして A2, B2, C2 この数式を適用する必要があるデータの各列の最初のセルを示します。それらを変更することもできます。
  • 2.上記の式は、3列のデータに基づいています。データ範囲に、最初の行から重複する値を見つける必要のある列が4つ以上ある場合は、次の式のように列参照を追加する必要があります。 =IF(COUNTIFS($A$2:$A$12,$A2,$B$2:$B$12,$B2,$C$2:$C$12,$C2,$D$2:$D$12,$D2)>1, "Duplicate row", "").

ヒント:最初に出現しない重複行を検索する場合は、次の式を適用してください。

=IF(COUNTIFS($A$2:$A2,$A2,$B$2:$B2,$B2,$C$2:$C2,$C2) >1, "Duplicate row", "")


条件付き書式を使用して、複数の列にまたがる重複行を強調表示します

数式を正しく適用できない場合でも、心配しないでください。 条件付き書式 ユーティリティは、重複する行を強調表示するのにも役立ちます。 次の手順を実行します。

1。 使用する必要がある最初のステップ 連結 すべてのデータを各行の2つのセルに結合する関数。 セルDXNUMXに以下の数式を入力し、データの最後の行まで数式をコピーします。スクリーンショットを参照してください。

=CONCATENATE(A2,B2,C2)

2。 次に、列Dの数式を含む重複行を検索する範囲を選択し、に移動します。 ホーム タブをクリックして 条件付き書式 > 新しいルール、スクリーンショットを参照してください:

3。 の中に 新しい書式設定規則 ダイアログボックスで、次の操作を行ってください。

  • 式を使用して、フォーマットするセルを決定する ルールタイプを選択します リストボックス;
  • そして、この式を入力します = COUNTIF($ D $ 2:$ D $ 12、$ D2)> 1 (最初に出現する重複行を強調表示する)または = COUNTIF($ D $ 2:$ D2、$ D2)> 1 (最初に出現することなく重複する行を強調表示する)を この数式が真であるときの書式値 テキストボックス;
  • 最後に、 フォーマット

Note:上記の式では、 $ D $ 2:$ D $ 12 は、他の列の値を組み合わせた列Dです。

4。 飛び出した セルの書式設定 ダイアログボックスで、をクリックします。 埋める タブをクリックし、重複を強調表示するために必要な色をXNUMXつ選択します。

5に設定します。 OK をクリックします。 OK > OK ダイアログボックスを閉じるには、重複する行が一度に選択した色で強調表示されます。スクリーンショットを参照してください。

最初の行で重複する行を強調表示します 最初の行なしで重複する行を強調表示する

便利な機能を使用して、複数の列にまたがる重複行を選択または強調表示します

上記の方法はやや面倒なので、ここでは簡単で便利なツールを紹介します-Kutools for Excelそのと 重複した一意のセルを選択する ユーティリティを使用すると、必要に応じて重複行または一意の行をすばやく選択できます。

注:これを適用する 重複した一意のセルを選択する、まず、ダウンロードする必要があります Kutools for Excel、次に機能をすばやく簡単に適用します。

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

1に設定します。 OK をクリックします。 クツール > 選択 > 重複セルと一意セルを選択します、スクリーンショットを参照してください:

2。 の中に 重複した一意のセルを選択する ダイアログボックスで、次の操作を行ってください。

  • button1  使用する範囲を選択するボタン。
  • 次に、 各行 に基づく セクション;
  • そして、チェック 重複(最初のものを除く) or すべての重複(最初のものを含む) 下のオプション ルール 必要に応じてセクション。
  • 最後に、下の重複行の背景色またはフォント色を指定できます。 結果の処理.

3。 次に、をクリックします OK、および重複する行は、次のスクリーンショットのように選択されます。

最初の行を含む重複する行を選択します 最初の行を除いて重複する行を選択します
  • 注意:
  • 1.チェックした場合 行全体を選択 オプションを選択すると、重複行全体または一意の行が選択されます。
  • 2.大文字と小文字を区別するオプションをオンにすると、テキストは大文字と小文字が区別されて比較されます。

 ダウンロードして無料トライアル 今すぐExcel用Kutools!


より相対的な記事:

  • リストから連続する重複セルを強調表示する
  • いくつかの連続した重複値を含むデータの長いリストがあるとすると、Excelに表示されている次のスクリーンショットのように、これらの連続した重複セルを強調表示するにはどうすればよいですか?
  • 重複する行を組み合わせてExcelで値を合計する
  • Excelでは、次のスクリーンショットに示すように、重複するエントリを含むデータの範囲があり、重複するデータを結合して対応する値を別の列に合計する場合、常にこの問題が発生する可能性があります。 この問題をどのように解決できますか?
  • Excelで異なる色の重複する値を強調表示する
  • Excelでは、条件付き書式を使用して、列内の重複する値をXNUMXつの色で簡単に強調表示できますが、次のスクリーンショットのように、重複をすばやく簡単に認識するために、異なる色で重複する値を強調表示する必要がある場合があります。 このタスクをExcelでどのように解決できますか?
  • 重複または一致する値をXNUMXつの列に揃える
  • 名前のリストがXNUMXつあり、これらXNUMXつの列を比較して両方の重複を見つけたい場合は、次のスクリーンショットのように、新しい列の最初の列に基づいて一致する名前を整列または表示します。 両方の列に存在する重複する値をリストするために、この記事ではそれを解決するためのいくつかのトリックを紹介する場合があります。

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

🤖 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
Fórmulas lixo, nenhuma funciona!
This comment was minimized by the moderator on the site
Hello Carlos,
So sorry to hear that. But I did try all of the formulas in the article and they all works fine. Please see the screenshots I upload. And I would love to help you on this matter if only you could provide the details of the errors. Thanks.Sincerely,Mandy
This comment was minimized by the moderator on the site
The formula "Sumproduct" does not work! The values ​​keep appearing non-duplicate, and since there are duplicate values, you must have got something wrong with this formula. Because I did the same and checked several times to find the error, but I was unsuccessful
This comment was minimized by the moderator on the site
Hello, Elienay,
The above Sumproduct formula works well in my worksheet, could you give your problem as an image to insert here?
Thank you!
This comment was minimized by the moderator on the site
I had to invent another formula to check for duplicate values, in fact I created two formulas! But with this "sumproduct" I couldn't fix it. However I already solved my problem, thanks! The formula I created looked like this: =IF(CONTIF($G$53:$G$55;G53)>1;"DUPLI";"NO")
This comment was minimized by the moderator on the site
at the time of data entry can i stop duplicate entries in two columns example :- Table A Table B A 1 B 2 at the time data entry once A & 1 is coming than i don't enter this entry, can any formula & idea for this
This comment was minimized by the moderator on the site
Can i find duplicate entries in two columns at time of data entry, that can i prevent duplicate entries in two columns example, Table A Table B A 1 B 2 at time of data entry next A and 1 i don't enter this entry, plz give any idea
This comment was minimized by the moderator on the site
Hi, suppose i have data of 15 letters (alphanumeric), and i want it to be split in different columns. ex - ASDFGH11WE31005 this is the 15 letters code, i want it to be spilt in different columns like - AS DF GH 11 WE 3 1005 pls suggest any shortcut or any formula to split it
This comment was minimized by the moderator on the site
Good day, I am dealing with a similar problem but one that goes beyond just checking for duplicates and I am hoping you could shed some light in as to how to tackle it. To illustrate I will build up onto the problem you have already illustrated above and adding some more complexities to it. Suppose after checking for and finding duplicates (ie., product, order or quantity and price), you now want to select a shop from which you can now buy your products from (I assume the duplicates tells you what products in what amount you can buy at what prices, and there is that repeat of products, orders and prices). The Shop Name given is for the shop that actually has stock of items required. A B C D E F PRODUCT ORDER PRICE SHOP NAME Distance to Shop (miles) Shop chosen to buy from QQQQ 50 30 Shop A 15 ? PPPP 60 40 Shop A 15 ? XXXX 45 28 Shop B 30 ? QQQQ 50 30 Shop A 15 ? VVVV 65 42 Shop A 15 ? BBBB 48 21 Shop A 15 ? XXXX 45 28 Shop B 30 ? QQQQ 50 30 Shop B 30 ? MMMM 80 35 Shop B 30 ? Suppose you now know you can buy a product at the given quantities (order) and at the given prices, at either Shop A or Shop B or Shop B but now you want to decide on the shop to buy from. One of the factors used in the criteria for shop selection could be how far the shop is from your own location. Obviously for product XXXX the only shop to buy from, where the product is available is Shop B therefore the value to return under column E would always be Shop B. For product QQQQ, you would have the option of buying from either Shop A or Shop B. You now want Excel to have you choose a shop to buy from. You want to select the nearest shop. How would you go about using a formula to solve this one? Regards, Moses
This comment was minimized by the moderator on the site
Suppose you have now ascertained that there are duplicates and the next thing is you want to check is if these duplicates (products, orders, and prices) can be obtained are from different shops. This is tantamount to introducing another column listingshops which actaully sell these products and you want to be able to select a shop to buy from based on another criteria not listed here (knowledge of shop location,distance to the shop, etc) Eg for Product QQQ, you can get same order at same price at both Shop A and Shop B and you wanna return either Shop A or Shop B based on that criteria you know. How would you tell Excel to return as a value either either Shop A or Shop B? PRODUCT ORDER PRICE SHOP NAME QQQQ 50 30 Shop A PPPP 60 40 Shop A XXXX 45 28 Shop B QQQQ 50 30 Shop A VVVV 65 42 Shop A BBBB 48 21 Shop A XXXX 45 28 Shop B QQQQ 50 30 Shop B MMMM 80 35 Shop B
This comment was minimized by the moderator on the site
This is very very very great INFO !! i was so confused to find this kind of formula in excel sheet but today i am so happy may god give you lots of happiness and success, Great Work buddy you're a Champ !!
This comment was minimized by the moderator on the site
Great Great Great Really best ideas I've ever seen
This comment was minimized by the moderator on the site
Yes!!! NASEER you can find duplicates... :)
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