Find And Remove Duplicates In Excelfasrhip



Yeah Google pls provide your method to remove duplicate files. Recommended this. Original Poster. Marked this as an answer. Recommended based on info available. Our automated system analyzes replies to choose the one that's most likely to answer the question. If it seems to be helpful, we may eventually mark it as a. Finding duplicates in columns let you examine a single column of data to see if there is anything in that column that has been duplicated. Open the spreadsheet you wish to analyze. Click into an open cell in the same sheet (for example, the next empty column in the sheet). In that empty cell, enter the following and then press Enter.

How to remove all duplicates but keep only one in Excel?

This tutorial introduces the tricks to remove all duplicate values from a list but keep only one in Excel, read the details:

Remove all duplicates but keep only one with Kutools for Excel

Combine all duplicate rows and keep data with Kutools for Excel

In Excel, the Remove Duplicate feature can help you remove all but keep one duplicate value.

1. Select the data list you need, and click Data > Remove Duplicates. See screenshot:

2. Then in Remove Duplicates dialog, check the column name that you want to remove duplicates from, and if your data has header, check My data has headers option, too. See screenshot:

3. Click OK. And a dialog pops out to tell you how many duplicates have been removed, just close it. And now all duplicates have been remove but keep only one in the list.

If you are interested in VBA, here I also can introduce a VBA code to solve this task.

1. Press Alt +F11 keys simultaneously to open Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste below VBA to the new Module window.

VBA: Remove all duplicates but keep one.

3. Press F5 key or click Run to execute the VBA, and the duplicates in list in column A have been removed but keep one.

Tip: In the above VBA, A indicates the column A, and A1: A indicates the list range, you can change them as you need.

There is a powerful utility in Kutools for Excel named Select Duplicate & Unique Cells can quickly select or highlight all duplicates except first one, and then you can remove them.

with more than 300 handy functions, makes your jobs more easier.

After free installing Kutools for Excel, please do as below:

1. Select the data range and click Kutools > Select > Select Duplicate & Unique Cells. See screenshot:

2. In the displayed dialog, check Duplicates (Except 1st one) option, and click Ok. See screenshot:

3. Then a dialog pops out to remind you the number of selected cells. And just click OK to close it. See screenshot:

4. And all the duplicates but first one are selected, press Delete key to clear them.

Tip: You also can remove all duplicates but keep one with Select Duplicate & Unique Cells like this:

Select all the unique values including the first duplicates, and then copy them by pressing Ctrl + C and paste to another location by Ctrl + V.


Kutools for Excel: 300 + functions you must have in Excel, 30-day free trial from here

If you have some data, and what you want is to combine the duplicate rows then keep the corresponding data as below screenshot shown, you can use Kutools for Excel’s Advanced Combine Rows function.

After free installing Kutools for Excel, please do as below:

1. Select the data and click Kutools > Merge & Split > Advanced Combine Rows. See screenshot:

2. In the Combine Rows Based on Column dialog, select the column you want to remove duplicate from and click Primary Key to make it as the primary key column. See screenshot:

3. Then select the column you just want to keep the data and then click Combine, and select one delimiter form the list. See screenshot:

Find And Remove Duplicates In Excelfasrhip

4. Click Ok, and the duplicate rows are combine and keep the corresponding data.


Kutools for Excel: 300 + functions you must have in Excel, 30-day free trial from here

Relative Articles:

  • How to generate random number without duplicates in Excel?

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

This page describes how to remove duplicate rows in Excel, using three different methods.

If you want to remove duplicate cells (rather than entire rows of data), you may find the Remove Duplicate Cells page more straightforward.

In order to illustrate how to remove duplicate rows in an Excel spreadsheet, we will use the example spreadsheet below, which has data spanning three columns.


We first show how to use Excel's Remove Duplicates Command to remove duplicate rows and then we show how to use use Excel's Advanced Filter to perform the same task. Finally, we show how to remove duplicate rows using Excel Formulas.

Note that the methods described keep the first occurrence of each row, but delete any subsequent duplicate rows.


Remove Duplicate Rows Using the Excel Remove Duplicates Command

The Remove Duplicates command is located in the 'Data Tools' group, within the Data tab of the Excel ribbon.

To remove duplicate rows using this command:

  • Select any cell within the data set that you want to remove the duplicates from, and click on the Remove Duplicates button.
  • You will be presented with the Remove Duplicates dialog box, as shown below:

    This dialog box allows you to select which columns of your data set you want to be included in the comparison for duplicate information. In the example spreadsheet above, we only want a record to be removed if the contents of all three columns contain duplicate information. Therefore we leave all three fields selected within the dialog box.

  • Once you have ensured that the required fields are checked in the dialog box, click OK.

    Excel will then delete the duplicate rows, as required and will present you with a message, informing you of the number of records removed and the number of unique records remaining (see below).

    The resulting example spreadsheet is shown on the rightabove. As required, the duplicate row 7 (for Laura CARTER, id: #31032) has been removed.



Remove Duplicates Using the Excel Advanced Filter

The Excel advanced filter has an option that allows you to filter unique records (rows of data) in a spreadsheet and copy the resulting filtered list to a new location.

This gives you a data set that contains the first occurrence of a duplicated row, but does not contain any further occurrences.

To remove duplicate rows using the Advanced Filter:

  • Select the data that you want to remove the duplicates from (columns A-C in the example spreadsheet above);

    (Alternatively, if you select any cell within the data set, Excel will automatically select the entire range of data when you activate the advanced filter).
  • Select the Excel Advanced Filter option from the Data tab at the top of your Excel workbook

    (or in Excel 2003, this option is located in Data→Filter menu).
  • You will be presented with a dialog box showing you the options for the Excel advanced filter (see below).

    Within this dialog box:

    • Select the option Copy to another location;
    • Make sure that the range that has been entered into the List range: field is correct;
    • In the Copy to field, enter the location that you want to copy the new list to.

      Note that this location must be in the current worksheet. In this example, cell E1 of the current Worksheet 'Sheet1' has been selected as the 'copy to' location;
    • Check the Unique records only box;
    • Click OK.

The resulting spreadsheet, with the new data list in column E, is shown below:

It can be seen that the duplicate row 7 (for Laura CARTER, id: #31032) has been removed from the data in columns E-G.

If you want to, you can now delete the columns to the left of your new data list (columns A-D in the example spreadsheet) to return to the original spreadsheet format.



Remove Duplicate Rows Using Excel Formulas

Warning: This method will only work if the contents of your cells are less than 256 characters in length, as Excel functions cannot handle text strings that are longer than this.

In order to illustrate how to use Excel formulas to remove duplicate rows in an Excel spreadsheet, we will again use the simple example spreadsheet (repeated on the rightabove), that contains the personal data (forename, surname and ID Number) of nine individuals.

The first step of removing the duplicate rows is to combine the contents of the columns A-C into a single column. We will then highlight the rows corresponding to the duplicate values, before deleting these rows.


Step 1: Combine Columns

We first combine the data from columns A-C of the example spreadsheet, using the concatenation & operator in column D. The formula to be entered into cell D2 is:

Copying this formula down all rows gives the following spreadsheet:


Step 2: Highlight Duplicate Rows

Once the contents of columns A-C have been concatenated into column D, we need to find the duplicates in the combined column D.

This can be done using the Countif function, as shown in column E of the spreadsheet below. This function shows the number of occurrences of each value in column D, up to the current row only.


Find And Remove Duplicates

As shown in the formula bar of the above spreadsheet, the format of the Countif function in cell E2 is:

=COUNTIF( D$2:D2, D2 )

Note that this function uses a combination of Absolute and Relative Cell References. Due to this combination of reference styles, as the formula is copied down column E, it becomes,

=COUNTIF( D$2:D3, D3 )
=COUNTIF( D$2:D4, D4 )
=COUNTIF( D$2:D5, D5 )
etc.

Therefore, the formula in cell E4 returns the value 1 for the first occurrence of the text string 'LauraCARTER#31032', but the formula in cell E7 returns the value 2 for the second occurence of this text string.

Find And Delete Duplicates

Step 3: Delete the Duplicate Rows

Once we have used the Countif function to highlight the duplicates in column D of the example spreadsheet, we need to delete the rows for which the count is greater than 1.

In the simple example spreadsheet, it is easy to see, and to delete, the single duplicate row. However, if you have several duplicates, you might find it faster to delete all duplicates at once, using the Excel Autofilter.

Use to Excel Autofilter to Delete the Duplicate Rows

The following steps show how to remove several duplicate rows at once, (after they have been highlighted using the Countif function):

  • Select the column containing the Countif function (column E in the example spreadsheet above);

    (Alternatively, if you select any cell within the current data set, Excel will automatically select the entire range of data when you activate the autofilter).
  • Click on the Filter button in the Data tab of your spreadsheet to apply the Excel Autofilter to your data;
  • Use the filter at the top of column E to select rows that are not equal to 1.

    I.e. click on the filter and, from the list of values, uncheck the value 1;
  • You will be left with a spreadsheet in which the first occurrence of every row is hidden. I.e. only the duplicate rows are displayed.

    You can delete these rows by highlighting them, then right clicking with the mouse and selecting Delete Rows.

  • Remove the filter and you will be left with the spreadsheet shown below, in which the duplicate row 7 has been removed.

    You can now delete the columns containing your formulas (columns D and E in the example spreadsheet), to return to the original spreadsheet format.

Return to the Excel Formulas Page
Return to the ExcelFunctions.net Home Page