How to Identify Duplicate Data in Google Sheets: Using Functions and Conditional Formatting

このページにはプロモーションが含まれています。

In our previous article, we covered how to remove duplicate data in Google Sheets. This time, we’ll focus on how to extract duplicate data efficiently.

Using functions is ideal when you want to automate the extraction process, while conditional formatting is perfect for visually identifying duplicates at a glance. Both methods offer unique advantages depending on your specific needs.

TOC

Extracting Duplicate Data Using Functions

Main Methods for Extracting Duplicate Data with Functions
  • To display all rows with duplicate data:
    • Use a combination of the FILTER() and COUNTIF() functions.
  • To display duplicate data only once:
    • Use a combination of the UNIQUE() and FILTER() functions.

There are two main methods to extract duplicate data using functions.

Function to Display All Rows with Duplicate Data (FILTER and COUNTIF)

Example Formula:

=FILTER(A2:A, COUNTIF(A2:A, A2:A) > 1)

All duplicate data in column A will be displayed.

In this formula, the COUNTIF function is used to check how many times each cell’s value appears, and the FILTER() function extracts the data where the occurrence count is greater than 1.

This method is useful when you want to display all duplicate rows.

Function to Display Duplicate Data Only Once (UNIQUE and FILTER)

Example Formula:

=UNIQUE(FILTER(A2:A, COUNTIF(A2:A, A2:A) > 1))

The duplicate data (e.g., “Laptop,” “Keyboard,” “Monitor”) will be displayed only once.

The FILTER() function is used to extract the duplicate data, and the UNIQUE() function then lists each duplicate data entry only once.

This method is useful when you want to identify the types of duplicate data.

To Display the Number of Duplicates for Each Data

Example Formula to Show Duplicate Counts:

=ARRAYFORMULA(IF(C2:C <> "", COUNTIF(A:A, C2:C), ""))

The number of times each data item in column C appears in column A will be displayed in column D.

This allows you to identify the types of duplicate data and their occurrence counts.

Highlighting Duplicate Data Using Conditional Formatting

Conditional formatting is a convenient way to visually identify duplicate data.

STEP
Select the Data Range

Choose the range of data where you want to find duplicates.

STEP
Open Conditional Formatting

From the menu, select “Format”“Conditional formatting.”

(You can also right-click and select “Conditional formatting” from the context menu.)

STEP
Choose Custom Formula

In the conditional formatting rules, select “Custom formula is” and enter the following formula.

Example Formula (to check column A):

=COUNTIF(A:A, A1) > 1

STEP
Select the Desired Color and Finish

Choose your preferred color for highlighting and click “Done” to apply the formatting.

Conclusion

There are several methods to extract duplicate data in Google Sheets, including using functions and conditional formatting.

For more advanced customization, you can also use Google Apps Script (GAS) to extract duplicate data.

Choose the method that best fits your specific needs to streamline your workflow effectively.

  • Functions: When you want to automatically filter duplicates.
  • Conditional Formatting: When you need to visually identify duplicates.
  • GAS (Google Apps Script): When customized processing is required.

この作業、毎回手作業でやっていませんか?

合同会社橋爪オフィスでは、こうした繰り返し作業を自動化する仕組みを構築しています。ExcelやGoogleスプレッドシート、GASを使い、ヒアリングから納品まで代表が直接対応します。ある会社では、年間1,000時間以上の作業を削減しました。

IT導入補助金・ITツール登録のご相談はこちら/その他のお問い合わせはこちら

Let's share this post !
TOC