All posts

How to Remove Duplicate Rows in a CSV by One Column (Keep the First or Last)

··3 min read

To remove duplicate rows by one column, choose the column that must be unique, such as Email, and keep one row for each value. The remove CSV duplicates by column tool does this in your browser. You pick the column, optionally a second column that must repeat with it, and whether to keep the first or the last row of each repeat. It then gives you the list without repeats and the rows it removed.

This is the step after joining two exports, when the same person appears twice.

Why one column and not the whole row

Two rows for the same person are rarely identical. One may have a job title the other lacks, or a different sign-up date. A whole-row duplicate check keeps both. Choosing the one column that must be unique, Email for contacts or Phone for a call list, removes the real repeats.

Step 1: do it by hand in Excel

In Excel, select the data, then choose Data, Remove Duplicates, untick every column except the one that must be unique. Excel keeps the first row of each value and deletes the rest. It tells you how many were removed but not which, and there is no way to keep the last row instead without sorting the data first.

Before you do this, trim stray spaces from the key column. A trailing space makes two copies of an address look different. See how to clean CSV columns before an import.

Step 2: use the tool

  1. Upload the CSV or .xlsx, or paste the cells with the header row first.
  2. Choose the column that must be unique, and a second column if the pair must repeat together.
  3. Choose whether to keep the first or the last row of each repeat.
  4. Download the list without repeats, and the removed rows if you want to see them.

Cells are trimmed and compared without regard to case by default. So AVA@example.com repeats ava@example.com. There is a switch for exact case. Rows where the chosen cells are all blank are never treated as repeats of each other, and they are counted so you can see how many there are.

Step 3: first or last

Keep the first when your list is ordered with the best row first. Keep the last when newer rows come later. A re-export that updates earlier rows is the usual case for last. The removed rows are saved as a second file, each noting the row it repeats, so you can check what was dropped.

With a second column chosen, both cells must repeat together. The same email under two different campaigns is kept as two rows.

When the repeats are not exact

Exact repeats only means exact. ava@example.com and ava@exmaple.com are different values here, and so are Gmail addresses that differ by dots. For those, see Gmail dots and plus tags as duplicates and duplicate leads across several sources. If you would rather fill the blanks of one row from its repeat, use the duplicate email row merger.

What this cannot do

  • It finds exact repeats only. A typo makes a different value.
  • When two rows repeat, one is dropped whole. It does not copy cells from one into the other.
  • Only the first sheet of a workbook is read.
  • It does not check whether an address exists.

Verify what you kept

Removing repeats leaves one row per address, but not a working address. Upload the kept list on the verify page: the first 100 email checks are free with a Google sign-in, no card. Each address comes back valid, risky or invalid with a reason, and nothing is sent to anyone on the list. For larger or recurring lists, see bulk email verification, list cleaning and pricing.

Remove your repeats now

Upload the file to remove CSV duplicates by column.

Common questions

How do I remove duplicate rows from a CSV based on one column?

Choose the column that must be unique, such as Email, and keep one row for each value. In Excel use Data, Remove Duplicates and tick only that column. A browser tool does the same and also shows the rows removed.

Should I keep the first or the last duplicate?

Keep the first when the best row comes first, such as the oldest or most complete. Keep the last when later rows are newer, such as a re-export that updates earlier rows.

Is a duplicate check case sensitive?

It should not be for emails. AVA@example.com and ava@example.com should count as the same address, so compare without regard to case.

What happens to rows where the column is blank?

They should not count as repeats of each other. A blank is a missing value, not a shared one.

Does removing duplicates find typos?

No. It finds exact repeats only. An address with a typo or an extra dot is a different value.

Check your list before you send

Real mailbox checks over SMTP, and nothing is sent to the address. Sign in with Google and your first 100 email checks are free, no card. Plans for bigger lists are on the pricing page.