Excel Paste and Remove Duplicates: Steps and Safety

How-to basics · Updated November 3, 2026

Excel Paste and Remove Duplicates: Steps and Safety

To paste data and remove duplicates in Microsoft Excel for Microsoft 365 on Windows, copy the data, select the destination cell, and press Ctrl+V; then select the combined data range and choose Data > Remove Duplicates. In the dialog, select the columns that define a duplicate, confirm whether the range has headers, and choose OK. Excel keeps the first matching record and removes later matches, so check the selection and save a copy before cleaning important data.

What Remove Duplicates does

Excel’s Remove Duplicates command deletes repeated records from a selected range or table. It compares the values in the columns you choose, then keeps the first row it encounters for each combination and removes later rows with the same combination. The remaining rows stay in their original order; Excel does not sort the data as part of this operation.

The important detail is that a duplicate is defined by the columns selected in the dialog. If you choose every column, Excel removes rows only when all selected values match. If you choose just Customer ID, rows with the same ID count as duplicates even if their names, dates, or amounts differ. That can be useful for keeping one record per customer, but risky if each row represents a separate transaction.

Remove Duplicates is a destructive cleanup command: it deletes matching rows from the selected range. It is not the same as hiding duplicates, highlighting them, or creating a separate list. If you need to inspect or preserve every original record, make a copy of the data first or use a non-destructive method described below.

Paste data before cleaning it

First decide where the copied data belongs. In the destination worksheet, select the top-left cell where the pasted block should begin. Press Ctrl+V on Windows. The pasted cells fill the destination area, so make sure they will not overwrite information you need. If the copied block has several columns, check that the destination columns line up with the existing headers before proceeding.

When you paste new rows beneath an existing list, paste into the first empty row below the list rather than over its headers. For example, if a table has headers in row 1 and existing records in rows 2 through 100, new records usually belong starting in row 101. If Excel recognizes the data as a table, the table may expand as records are added; still verify that all pasted columns landed under the intended headings.

  • Use Ctrl+C and Ctrl+V on Windows to copy and paste. On a Mac, use Command+C and Command+V.
  • To paste only values instead of formulas or formatting, use Home > Paste > Paste Values, or open the paste options after copying and choose Values. The exact options shown can depend on the copied content.
  • If the data comes from a website or another application, inspect its columns and formatting after pasting. A value that looks like a date or number may have arrived as text.

After pasting, include both the original records and the new records in the range you plan to clean. If you select only the newly pasted rows, Excel cannot compare them with records above. Conversely, avoid selecting unrelated cells beside the list: a selection that includes extra columns can change what Excel treats as a complete duplicate row.

Remove duplicates step by step

For a normal worksheet range in Excel for Microsoft 365 on Windows, use this sequence:

  1. Click a cell in the data, or select the complete range you want to clean. Include all columns that belong to each record.
  2. Choose Data > Remove Duplicates.
  3. If the first row contains column labels, check My data has headers. If it does not, leave that box unchecked.
  4. In Columns, select the fields Excel should compare. Choose all fields for fully identical rows, or only the field or combination of fields that defines a duplicate for your task.
  5. Choose OK. Excel reports how many duplicate values were removed and how many unique values remain. Review the result and save the workbook.

If you click a single cell inside a contiguous block of data, Excel may detect and select the surrounding region for the command. Check the range or dialog carefully rather than assuming it captured precisely what you intended. For a table, click inside it and use Data > Remove Duplicates as well; the column names appear in the dialog when Excel recognizes the table headers.

On a Mac, the command is also on the Data tab as Remove Duplicates, although the ribbon layout can vary by Excel release and window size. Copy and paste use Command+C and Command+V, and undo uses Command+Z. In Excel for the web, look for Remove Duplicates on the Data tab; feature placement and available dialog options can differ from desktop Excel. If you do not see the command, use the desktop app or check the ribbon’s overflow controls.

Choose the right columns

The column choices determine what Excel removes. Suppose a list has Order ID, Customer, Date, and Amount. If two rows have the same customer and amount but different order IDs, they are separate orders. Selecting only Customer and Amount would treat the later one as a duplicate and delete it. If the goal is to remove repeated imports of the same order, Order ID may be the right identifying field. If there is no single unique ID, comparing a combination such as Customer, Date, and Amount may better match the meaning of a repeated record.

  • Remove completely repeated rows: select all columns that form the record. A repeat is removed only when the values match across those selected fields.
  • Keep one row per person or product: select the column that identifies that entity, such as Email or SKU. Be aware that Excel keeps the first row, which may not be the newest or most complete one.
  • Check for repeated combinations: select the relevant fields together, such as Date and Account. Excel compares the combination, not each column independently.

If you need to keep the newest record, sort by date before using Remove Duplicates so that the record you want to retain comes first. Sorting changes the row order, so ensure the complete dataset is included and consider making a copy. A safer option is to identify the preferred record first and remove duplicates only after verifying the intended keep-first order.

What Excel considers a match

Excel compares the underlying cell values in the selected columns, not merely whether two rows look alike on screen. Formatting differences such as font color or number formatting do not, by themselves, make records different. For instance, a date displayed as 1/2/2026 may match the same date displayed in another format if both cells contain the same date value.

Text differences can matter. A leading or trailing space, a different punctuation mark, or an extra character can make entries that appear similar fail to match. For example, an email address with a trailing space may not be treated like the same address without that space. Differences in capitalization are generally not a reliable way to distinguish records for this command; if capitalization carries meaning in your data, verify the results with a small test or a separate comparison method.

Cells containing formulas are compared by their resulting values rather than by whether their formulas were written identically. Two different formulas that return the same value may therefore be treated as duplicates in the selected columns. Likewise, a formula returning an empty string is not necessarily equivalent to a truly blank cell for every workflow. For data brought in from other sources, inspect suspicious entries and normalize inconsistent spaces or text before relying on a cleanup result.

Prevent mistakes and recover safely

Before confirming the dialog, pause to check the selected range, header setting, and columns. The most damaging mistake is usually choosing too few columns: Excel then deletes records that share the selected value even though other fields differ. Choosing too many columns has the opposite effect; records that should count as duplicates remain because one selected field differs.

A practical safeguard is to duplicate the worksheet or copy the source range to a backup sheet before cleanup. You can also save a separate workbook copy. Excel’s Undo command can often reverse a recent Remove Duplicates action if no later action has complicated recovery, but do not treat undo as your only backup. In a shared or important workbook, preserve an untouched source before making irreversible changes.

  • Confirm the header row is not being treated as a data record.
  • Check that all relevant columns and rows are included, including the pasted records.
  • Decide whether the first occurrence is the row you want to keep.
  • Review Excel’s removal count and spot-check records after the command runs.

Alternatives when you want to review first

Conditional formatting can flag repeated values without deleting rows. Select the cells or range to inspect, then choose Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. This is useful when you want to review which entries repeat before deciding what to remove. It highlights repeated values in the selected area; it does not necessarily identify fully repeated records across several columns in the way your business rules require.

For a separate list of distinct values, Excel for Microsoft 365 includes the UNIQUE function. It can return a distinct list without changing the source records, which is helpful for analysis. However, UNIQUE is not a direct substitute for cleaning a complete table: it returns results in another area and its behavior depends on the range and options you supply. The function is available in Microsoft 365 and Excel 2021 or later; older versions may not support it.

Another option is to copy the source to a new worksheet and run Remove Duplicates on the copy. This keeps the original intact while producing a cleaned version. Use this when you need an ordinary cleaned table but want a straightforward audit trail. For repeatable imports or larger data-cleaning processes, Power Query can remove duplicates as part of a query that can be refreshed, but it requires setting up and checking the transformation rather than simply editing the pasted range.

Frequently Asked Questions

Does Excel keep the first or last duplicate?
Remove Duplicates keeps the first occurrence it encounters in the selected data and removes later matching rows. If you want a particular record retained, arrange the rows so that record comes first, or verify and sort the data before cleanup.

Can I remove duplicates from only one column?
Yes. In the Remove Duplicates dialog, select only that column. Excel then removes later rows that repeat a value in that field, even if other columns differ. Make sure that is what you intend before confirming.

Will removing duplicates delete my whole row?
Excel removes the duplicate record’s row from the selected range. If the selection contains all fields for each record, those values are removed together. Avoid selecting only part of a wider dataset if doing so could leave related information misaligned or unchanged.

Why did Excel not remove two entries that look identical?
They may contain different underlying values, such as an extra space, different punctuation, or text stored differently from a number or date. Check the cells closely and normalize inconsistent data before running the command again. Display formatting alone can also make different values look deceptively similar.

Can I remove duplicates without deleting the original data?
Yes. Copy the data to another worksheet and run Remove Duplicates on the copy, or use Conditional Formatting to flag repeats for review. For a distinct list of values, UNIQUE can return results elsewhere without altering the source, if your Excel version supports it.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.